Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

33 lines
1022B

  1. <?php
  2. namespace Lc\CaracoleBundle\Definition\Field\Ticket;
  3. use Lc\CaracoleBundle\Definition\Field\FieldDefinitionTrait;
  4. use Lc\CaracoleBundle\Repository\Section\SectionStore;
  5. use Lc\SovBundle\Definition\Field\Ticket\TicketFieldDefinition as SovTicketFieldDefinition;
  6. use Lc\SovBundle\Solver\Ticket\TicketSolver;
  7. use Lc\SovBundle\Translation\TranslatorAdmin;
  8. class TicketFieldDefinition extends SovTicketFieldDefinition
  9. {
  10. use FieldDefinitionTrait;
  11. protected SectionStore $sectionStore;
  12. public function __construct(TranslatorAdmin $translatorAdmin, TicketSolver $ticketSolver, SectionStore $sectionStore)
  13. {
  14. parent::__construct($translatorAdmin, $ticketSolver);
  15. $this->sectionStore = $sectionStore;
  16. }
  17. public function configureIndex(): array
  18. {
  19. return $this->addSectionToFieldArrayIfOutOfSection($this->section, parent::configureIndex());
  20. }
  21. public function configureForm(): array
  22. {
  23. return array_merge(['section'], parent::configureForm());
  24. }
  25. }