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.2KB

3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
1234567891011121314151617181920212223242526272829303132333435363738
  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. ->setMerchant($this->getMerchantCurrent())
  16. ->create();
  17. }
  18. public function configureFields(string $pageName): iterable
  19. {
  20. return $this->getTicketContainer()->getFieldDefinition()
  21. ->setMerchant($this->getMerchantCurrent())
  22. ->getFields($pageName);
  23. }
  24. public function configureActions(Actions $actions): Actions
  25. {
  26. $actions = parent::configureActions($actions);
  27. $actions->disable( ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE);
  28. return $actions;
  29. }
  30. }