mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Migrate to SensioLabs attributes
This commit is contained in:
parent
a766826a69
commit
4e177e1778
30 changed files with 122 additions and 192 deletions
|
@ -21,10 +21,10 @@ class ExportController extends AbstractController
|
|||
/**
|
||||
* Gets one entry content.
|
||||
*
|
||||
* @IsGranted("EXPORT", subject="entry")
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/export/{entry}.{format}', name: 'export_entry', methods: ['GET'], requirements: ['format' => 'epub|pdf|json|xml|txt|csv|md', 'entry' => '\d+'])]
|
||||
#[IsGranted('EXPORT', subject: 'entry')]
|
||||
public function downloadEntryAction(Request $request, EntryRepository $entryRepository, EntriesExport $entriesExport, string $format, Entry $entry)
|
||||
{
|
||||
try {
|
||||
|
@ -41,10 +41,10 @@ class ExportController extends AbstractController
|
|||
/**
|
||||
* Export all entries for current user.
|
||||
*
|
||||
* @IsGranted("EXPORT_ENTRIES")
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/export/{category}.{format}', name: 'export_entries', methods: ['GET'], requirements: ['format' => 'epub|pdf|json|xml|txt|csv|md', 'category' => 'all|unread|starred|archive|tag_entries|untagged|search|annotated|same_domain'])]
|
||||
#[IsGranted('EXPORT_ENTRIES')]
|
||||
public function downloadEntriesAction(Request $request, EntryRepository $entryRepository, TagRepository $tagRepository, EntriesExport $entriesExport, string $format, string $category, int $entry = 0)
|
||||
{
|
||||
$method = ucfirst($category);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue