mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix error when displaying list of Person tasks.
This commit is contained in:
parent
b3b54486b5
commit
e9d485f814
@ -2,8 +2,6 @@
|
||||
|
||||
namespace Chill\TaskBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\PersonBundle\Privacy\PrivacyEvent;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
@ -21,20 +19,17 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\TaskBundle\Repository\SingleTaskRepository;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Chill\PersonBundle\Repository\PersonRepository;
|
||||
use Chill\TaskBundle\Event\TaskEvent;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Chill\TaskBundle\Event\UI\UIEvent;
|
||||
use Chill\MainBundle\Repository\CenterRepository;
|
||||
use Chill\MainBundle\Repository\ScopeRepository;
|
||||
use Chill\MainBundle\Repository\UserRepository;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Chill\TaskBundle\Event\TaskEvent;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Chill\TaskBundle\Event\UI\UIEvent;
|
||||
use Chill\MainBundle\Timeline\TimelineBuilder;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Repository\AccompanyingPeriodRepository;
|
||||
use Chill\PersonBundle\Repository\PersonRepository;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as TranslationTranslatorInterface;
|
||||
|
||||
/**
|
||||
@ -50,17 +45,17 @@ class SingleTaskController extends AbstractController
|
||||
|
||||
protected LoggerInterface $logger;
|
||||
|
||||
protected EntityRepository $personRepository;
|
||||
protected PersonRepository $personRepository;
|
||||
|
||||
protected EntityRepository $courseRepository;
|
||||
protected AccompanyingPeriodRepository $courseRepository;
|
||||
|
||||
protected UserRepository $userRepository;
|
||||
|
||||
protected CenterRepository $centerRepository;
|
||||
|
||||
protected ScopeRepository $scopeRepository;
|
||||
|
||||
protected SingleTaskRepository $taskRepository;
|
||||
|
||||
protected EntityRepository $userRepository;
|
||||
|
||||
protected EntityRepository $centerRepository;
|
||||
|
||||
protected EntityRepository $scopeRepository;
|
||||
|
||||
/**
|
||||
* SingleTaskController constructor.
|
||||
@ -71,17 +66,22 @@ class SingleTaskController extends AbstractController
|
||||
EventDispatcherInterface $eventDispatcher,
|
||||
TimelineBuilder $timelineBuilder,
|
||||
LoggerInterface $logger,
|
||||
EntityManagerInterface $em
|
||||
SingleTaskRepository $singleTaskRepository,
|
||||
PersonRepository $personRepository,
|
||||
AccompanyingPeriodRepository $courseRepository,
|
||||
UserRepository $userRepository,
|
||||
CenterRepository $centerRepository,
|
||||
ScopeRepository $scopeRepository
|
||||
) {
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->timelineBuilder = $timelineBuilder;
|
||||
$this->logger = $logger;
|
||||
$this->personRepository = $em->getRepository(Person::class);
|
||||
$this->courseRepository = $em->getRepository(AccompanyingPeriod::class);
|
||||
$this->taskRepository = $em->getRepository(SingleTask::class);
|
||||
$this->userRepository = $em->getRepository(User::class);
|
||||
$this->centerRepository = $em->getRepository(Center::class);
|
||||
$this->scopeRepository = $em->getRepository(Scope::class);
|
||||
$this->taskRepository = $singleTaskRepository;
|
||||
$this->scopeRepository = $scopeRepository;
|
||||
$this->centerRepository = $centerRepository;
|
||||
$this->userRepository = $userRepository;
|
||||
$this->personRepository = $personRepository;
|
||||
$this->courseRepository = $courseRepository;
|
||||
}
|
||||
|
||||
|
||||
@ -533,9 +533,6 @@ class SingleTaskController extends AbstractController
|
||||
public function listAction(
|
||||
PaginatorFactory $paginatorFactory,
|
||||
// SingleTaskRepository $taskRepository,
|
||||
// PersonRepository $personRepository,
|
||||
// AccompanyingPeriodRepository $courseRepository,
|
||||
// CenterRepository $centerRepository,
|
||||
FormFactoryInterface $formFactory,
|
||||
Request $request
|
||||
) {
|
||||
|
@ -1,12 +1,6 @@
|
||||
services:
|
||||
Chill\TaskBundle\Controller\:
|
||||
resource: "../../Controller"
|
||||
tags: ["controller.service_arguments"]
|
||||
|
||||
Chill\TaskBundle\Controller\SingleTaskController:
|
||||
arguments:
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
$timelineBuilder: "@chill_main.timeline_builder"
|
||||
$logger: "@chill.main.logger"
|
||||
$em: "@doctrine.orm.default_entity_manager"
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
tags: ["controller.service_arguments"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user