|
1234567891011121314151617181920212223242526272829303132 |
- <?php
-
- namespace Lc\CaracoleBundle\Definition\Field\Ticket;
-
- use Lc\CaracoleBundle\Definition\Field\FieldDefinitionTrait;
- use Lc\CaracoleBundle\Repository\Section\SectionStore;
- use Lc\SovBundle\Definition\Field\Ticket\TicketFieldDefinition as SovTicketFieldDefinition;
- use Lc\SovBundle\Solver\Ticket\TicketSolver;
- use Lc\SovBundle\Translation\TranslatorAdmin;
-
- class TicketFieldDefinition extends SovTicketFieldDefinition
- {
- use FieldDefinitionTrait;
-
- protected SectionStore $sectionStore;
-
- public function __construct(TranslatorAdmin $translatorAdmin, TicketSolver $ticketSolver, SectionStore $sectionStore)
- {
- parent::__construct($translatorAdmin, $ticketSolver);
- $this->sectionStore = $sectionStore;
- }
-
- public function configureIndex(): array
- {
- return $this->addSectionToFieldArrayIfOutOfSection($this->section, parent::configureIndex());
- }
-
- public function configureForm(): array
- {
- return array_merge(['section'], parent::configureForm());
- }
- }
|