sectionStore = $sectionStore; $this->newsletterStore = $newsletterStore; } public function configureIndex(): array { return $this->addSectionToFieldArrayIfOutOfSection($this->section, parent::configureIndex()); } public function configurePanelMain(): array { return array_merge(['section'], parent::configurePanelMain()); } public function configureFields(): array { $fieldArray = parent::configureFields(); $newsletterArray = $this->newsletterStore ->setSection($this->section) ->setMerchant($this->merchant) ->get(); $fieldArray['newsletter']->setFormTypeOption('choices', $newsletterArray); return $fieldArray; } }