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.

NewsletterAdminController.php 922B

3 年之前
3 年之前
3 年之前
12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Newsletter;
  3. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  4. use Lc\SovBundle\Container\Newsletter\NewsletterContainer;
  5. use Lc\SovBundle\Controller\Newsletter\NewsletterAdminController as SovNewsletterAdminController;
  6. abstract class NewsletterAdminController extends SovNewsletterAdminController
  7. {
  8. use AdminControllerTrait;
  9. public function createEntity(string $entityFqcn)
  10. {
  11. return $this->get(NewsletterContainer::class)
  12. ->getFactory()
  13. ->setSection($this->getSectionCurrent())
  14. ->create();
  15. }
  16. public function configureFields(string $pageName): iterable
  17. {
  18. return $this->getNewsletterContainer()->getFieldDefinition()
  19. ->setMerchant($this->getMerchantCurrent())
  20. ->setSection($this->getSectionCurrent())
  21. ->getFields($pageName);
  22. }
  23. }