|
123456789101112131415161718192021222324252627282930313233343536 |
- <?php
-
- namespace Lc\CaracoleBundle\Definition\Field\Newsletter;
-
- use Lc\CaracoleBundle\Definition\Field\FieldDefinitionTrait;
- use Lc\CaracoleBundle\Repository\Section\SectionStore;
- use Lc\SovBundle\Definition\Field\Newsletter\NewsletterFieldDefinition as SovNewsletterFieldDefinition;
- use Lc\SovBundle\Translation\TranslatorAdmin;
-
- class NewsletterFieldDefinition extends SovNewsletterFieldDefinition
- {
- use FieldDefinitionTrait;
-
- protected SectionStore $sectionStore;
-
- public function __construct(TranslatorAdmin $translatorAdmin, SectionStore $sectionStore)
- {
- parent::__construct($translatorAdmin);
- $this->sectionStore = $sectionStore;
- }
-
- public function configureIndex(): array
- {
- return $this->addSectionToFieldArrayIfOutOfSection($this->section, [
- 'id',
- 'title',
- 'isMain',
- 'status'
- ]);
- }
-
- public function configurePanelMain(): array
- {
- return array_merge(['section'], parent::configurePanelMain());
- }
- }
|