You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TicketAdminController.php 1.3KB

3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Ticket;
  3. use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
  4. use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
  5. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  6. use Lc\CaracoleBundle\Definition\ActionDefinition;
  7. use Lc\SovBundle\Controller\Ticket\TicketAdminController as SovTicketAdminController;
  8. abstract class TicketAdminController extends SovTicketAdminController
  9. {
  10. use AdminControllerTrait;
  11. public function createEntity(string $entityFqcn)
  12. {
  13. return $this->getTicketContainer()
  14. ->getFactory()
  15. ->setSection($this->getSectionCurrent())
  16. ->setMerchant($this->getMerchantCurrent())
  17. ->create();
  18. }
  19. public function configureFields(string $pageName): iterable
  20. {
  21. return $this->getTicketContainer()->getFieldDefinition()
  22. ->setMerchant($this->getMerchantCurrent())
  23. ->setSection($this->getSectionCurrent())
  24. ->getFields($pageName);
  25. }
  26. public function configureActions(Actions $actions): Actions
  27. {
  28. $actions = parent::configureActions($actions);
  29. $actions->disable( ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE);
  30. return $actions;
  31. }
  32. }