選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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