use Lc\SovBundle\Definition\AbstractSettingDefinition; | use Lc\SovBundle\Definition\AbstractSettingDefinition; | ||||
class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface | |||||
class SectionSettingDefinition extends AbstractSettingDefinition | |||||
{ | { | ||||
const CATEGORY_GENERAL = 'general'; | const CATEGORY_GENERAL = 'general'; | ||||
<?php | |||||
namespace Lc\CaracoleBundle\Definition; | |||||
interface SectionSettingDefinitionInterface | |||||
{ | |||||
} |
namespace Lc\CaracoleBundle\EventSubscriber; | namespace Lc\CaracoleBundle\EventSubscriber; | ||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | |||||
use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | |||||
use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | |||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | |||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | |||||
use Lc\CaracoleBundle\Repository\Section\OpeningRepositoryQuery; | |||||
use Lc\CaracoleBundle\Repository\Section\SectionRepository; | |||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||||
use Symfony\Component\HttpKernel\KernelEvents; | use Symfony\Component\HttpKernel\KernelEvents; | ||||
class OpeningEventSubscriber implements EventSubscriberInterface | class OpeningEventSubscriber implements EventSubscriberInterface | ||||
{ | { | ||||
protected $entityManager; | |||||
protected $openingRepositoryQuery; | |||||
protected EntityManagerInterface $entityManager; | |||||
public function __construct( | public function __construct( | ||||
EntityManagerInterface $entityManager, | |||||
OpeningRepositoryQuery $openingRepositoryQuery | |||||
EntityManagerInterface $entityManager | |||||
) { | ) { | ||||
$this->entityManager = $entityManager; | $this->entityManager = $entityManager; | ||||
$this->openingRepositoryQuery = $openingRepositoryQuery; | |||||
} | } | ||||
public static function getSubscribedEvents() | public static function getSubscribedEvents() | ||||
public function initOpenings() | public function initOpenings() | ||||
{ | { | ||||
} | } | ||||
} | } |
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | ||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinition; | |||||
use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory; | ||||
use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory; | ||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | use Lc\CaracoleBundle\Model\Section\SectionInterface; | ||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | |||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository; | |||||
use Lc\CaracoleBundle\Repository\Merchant\MerchantStore; | use Lc\CaracoleBundle\Repository\Merchant\MerchantStore; | ||||
use Lc\CaracoleBundle\Repository\Section\SectionRepository; | |||||
use Lc\CaracoleBundle\Repository\Section\SectionStore; | use Lc\CaracoleBundle\Repository\Section\SectionStore; | ||||
use Lc\SovBundle\Solver\Setting\SettingSolver; | use Lc\SovBundle\Solver\Setting\SettingSolver; | ||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||||
{ | { | ||||
protected EntityManagerInterface $entityManager; | protected EntityManagerInterface $entityManager; | ||||
protected MerchantSettingDefinitionInterface $merchantSettingDefinition; | protected MerchantSettingDefinitionInterface $merchantSettingDefinition; | ||||
protected SectionSettingDefinitionInterface $sectionSettingDefinition; | |||||
protected SectionSettingDefinition $sectionSettingDefinition; | |||||
protected MerchantStore $merchantStore; | protected MerchantStore $merchantStore; | ||||
protected SectionStore $sectionStore; | protected SectionStore $sectionStore; | ||||
protected MerchantSettingFactory $merchantSettingFactory; | protected MerchantSettingFactory $merchantSettingFactory; | ||||
public function __construct( | public function __construct( | ||||
EntityManagerInterface $entityManager, | EntityManagerInterface $entityManager, | ||||
MerchantSettingDefinitionInterface $merchantSettingDefinition, | MerchantSettingDefinitionInterface $merchantSettingDefinition, | ||||
SectionSettingDefinitionInterface $sectionSettingDefinition, | |||||
SectionSettingDefinition $sectionSettingDefinition, | |||||
MerchantStore $merchantStore, | MerchantStore $merchantStore, | ||||
SectionStore $sectionStore, | SectionStore $sectionStore, | ||||
MerchantSettingFactory $merchantSettingFactory, | MerchantSettingFactory $merchantSettingFactory, |
namespace Lc\CaracoleBundle\Form\Setting; | namespace Lc\CaracoleBundle\Form\Setting; | ||||
use FOS\CKEditorBundle\Form\Type\CKEditorType; | |||||
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface; | ||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinition; | |||||
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface; | use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface; | ||||
use Lc\CaracoleBundle\Model\Setting\SectionSettingInterface; | use Lc\CaracoleBundle\Model\Setting\SectionSettingInterface; | ||||
use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface; | |||||
use Lc\SovBundle\Form\Common\FileManagerType; | |||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | |||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | use Symfony\Component\Form\Extension\Core\Type\HiddenType; | ||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TimeType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | use Symfony\Component\Form\FormBuilderInterface; | ||||
use Symfony\Component\Form\FormEvent; | use Symfony\Component\Form\FormEvent; | ||||
use Symfony\Component\Form\FormEvents; | use Symfony\Component\Form\FormEvents; | ||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
use Lc\SovBundle\Form\Setting\BaseSettingType as SovBaseSettingType; | use Lc\SovBundle\Form\Setting\BaseSettingType as SovBaseSettingType; | ||||
abstract class BaseSettingType extends SovBaseSettingType | abstract class BaseSettingType extends SovBaseSettingType | ||||
{ | { | ||||
protected $em; | |||||
protected $merchantSettingDefinition; | |||||
protected $sectionSettingDefinition; | |||||
protected EntityManagerInterface $em; | |||||
protected MerchantSettingDefinitionInterface $merchantSettingDefinition; | |||||
protected SectionSettingDefinition $sectionSettingDefinition; | |||||
public function __construct( | public function __construct( | ||||
EntityManagerInterface $entityManager, | EntityManagerInterface $entityManager, | ||||
MerchantSettingDefinitionInterface $merchantSettingDefinition, | MerchantSettingDefinitionInterface $merchantSettingDefinition, | ||||
SectionSettingDefinitionInterface $sectionSettingDefinition | |||||
SectionSettingDefinition $sectionSettingDefinition | |||||
) { | ) { | ||||
$this->em = $entityManager; | $this->em = $entityManager; | ||||
$this->merchantSettingDefinition = $merchantSettingDefinition; | $this->merchantSettingDefinition = $merchantSettingDefinition; |