mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 13:54:59 +00:00
fix how to get task repository
This commit is contained in:
@@ -148,10 +148,9 @@ class SingleTaskController extends AbstractController
|
||||
*/
|
||||
public function showAction(Request $request, $id)
|
||||
{
|
||||
/* @var $taskRepository SingleTaskRepository */
|
||||
$taskRepository = $this->get('chill_task.single_task_repository');
|
||||
|
||||
$task = $taskRepository->find($id);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$task = $em->getRepository(SingleTask::class)->find($id);
|
||||
|
||||
if (!is_null($task->getPerson() === !null)) {
|
||||
$personId = $task->getPerson()->getId();
|
||||
@@ -203,10 +202,9 @@ class SingleTaskController extends AbstractController
|
||||
$id,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
/* @var $taskRepository SingleTaskRepository */
|
||||
$taskRepository = $this->get('chill_task.single_task_repository');
|
||||
|
||||
$task = $taskRepository->find($id);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$task = $em->getRepository(SingleTask::class)->find($id);
|
||||
|
||||
if (!is_null($task->getPerson() === !null)) {
|
||||
$personId = $task->getPerson()->getId();
|
||||
@@ -297,10 +295,9 @@ class SingleTaskController extends AbstractController
|
||||
$id,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
/* @var $taskRepository SingleTaskRepository */
|
||||
$taskRepository = $this->get('chill_task.single_task_repository');
|
||||
|
||||
$task = $taskRepository->find($id);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$task = $em->getRepository(SingleTask::class)->find($id);
|
||||
|
||||
if (!$task) {
|
||||
throw $this->createNotFoundException('Unable to find Task entity.');
|
||||
|
Reference in New Issue
Block a user