Browse Source

Correctif backend

feature/export_comptable
Fab 4 years ago
parent
commit
f16e170334
1 changed files with 28 additions and 0 deletions
  1. +28
    -0
      ShopBundle/Controller/Backend/TicketController.php

+ 28
- 0
ShopBundle/Controller/Backend/TicketController.php View File

namespace Lc\ShopBundle\Controller\Backend; namespace Lc\ShopBundle\Controller\Backend;


use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents;
use FOS\UserBundle\Model\UserManagerInterface; use FOS\UserBundle\Model\UserManagerInterface;
use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType; use Lc\ShopBundle\Form\Backend\Ticket\TicketMessageType;
use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType; use Lc\ShopBundle\Form\Backend\Ticket\TicketStatusType;


} }



public function showAction()
{
$this->dispatch(EasyAdminEvents::PRE_SHOW);

$id = $this->request->query->get('id');
$easyadmin = $this->request->attributes->get('easyadmin');
$entity = $easyadmin['item'];

$fields = $this->entity['show']['fields'];
$deleteForm = $this->createDeleteForm($this->entity['name'], $id);

$this->dispatch(EasyAdminEvents::POST_SHOW, [
'deleteForm' => $deleteForm,
'fields' => $fields,
'entity' => $entity,
]);

$parameters = [
'entity' => $entity,
'fields' => $fields,
'delete_form' => $deleteForm->createView(),
];

return $this->executeDynamicMethod('render<EntityName>Template', ['show', $this->entity['templates']['show'], $parameters]);
}

/** /**
* The method that is executed when the user performs a 'show' action on an entity. * The method that is executed when the user performs a 'show' action on an entity.
* *

Loading…
Cancel
Save