1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Use FQCN as service name for repositories

This commit is contained in:
Yassine Guedidi 2022-04-24 17:58:57 +02:00
parent 844e8e9d22
commit 0f9c359476
17 changed files with 68 additions and 50 deletions

View file

@ -8,6 +8,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Helper\EntriesExport;
use Wallabag\CoreBundle\Repository\EntryRepository;
use Wallabag\CoreBundle\Repository\TagRepository;
/**
* The try/catch can be removed once all formats will be implemented.
@ -57,11 +59,11 @@ class ExportController extends Controller
{
$method = ucfirst($category);
$methodBuilder = 'getBuilderFor' . $method . 'ByUser';
$repository = $this->get('wallabag_core.entry_repository');
$repository = $this->get(EntryRepository::class);
$title = $method;
if ('tag_entries' === $category) {
$tag = $this->get('wallabag_core.tag_repository')->findOneBySlug($request->query->get('tag'));
$tag = $this->get(TagRepository::class)->findOneBySlug($request->query->get('tag'));
$entries = $repository->findAllByTagId(
$this->getUser()->getId(),