getTicketContainer() ->getFactory() ->setSection($this->getSectionCurrent()) ->setMerchant($this->getMerchantCurrent()) ->create(); } public function configureFields(string $pageName): iterable { return $this->getTicketContainer()->getFieldDefinition() ->setMerchant($this->getMerchantCurrent()) ->setSection($this->getSectionCurrent()) ->getFields($pageName); } public function configureActions(Actions $actions): Actions { $actions = parent::configureActions($actions); if(!$this->getSectionCurrent()) { $actions->disable(ActionDefinition::NEW, ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE); }else{ $actions->disable( ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE); } return $actions; } }