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.

TicketFieldDefinition.php 1022B

преди 3 години
1234567891011121314151617181920212223242526272829303132
  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. }