您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

41 行
1.3KB

  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. }