Parcourir la source

Adaptations setting sections

packProduct
Guillaume il y a 3 ans
Parent
révision
6ea7de74b5
5 fichiers modifiés avec 11 ajouts et 44 suppressions
  1. +1
    -1
      Definition/SectionSettingDefinition.php
  2. +0
    -10
      Definition/SectionSettingDefinitionInterface.php
  3. +2
    -14
      EventSubscriber/OpeningEventSubscriber.php
  4. +3
    -5
      EventSubscriber/SettingEventSubscriber.php
  5. +5
    -14
      Form/Setting/BaseSettingType.php

+ 1
- 1
Definition/SectionSettingDefinition.php Voir le fichier

@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Definition;

use Lc\SovBundle\Definition\AbstractSettingDefinition;

class SectionSettingDefinition extends AbstractSettingDefinition implements SectionSettingDefinitionInterface
class SectionSettingDefinition extends AbstractSettingDefinition
{
const CATEGORY_GENERAL = 'general';


+ 0
- 10
Definition/SectionSettingDefinitionInterface.php Voir le fichier

@@ -1,10 +0,0 @@
<?php


namespace Lc\CaracoleBundle\Definition;


interface SectionSettingDefinitionInterface
{

}

+ 2
- 14
EventSubscriber/OpeningEventSubscriber.php Voir le fichier

@@ -3,28 +3,17 @@
namespace Lc\CaracoleBundle\EventSubscriber;

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\HttpKernel\KernelEvents;

class OpeningEventSubscriber implements EventSubscriberInterface
{
protected $entityManager;
protected $openingRepositoryQuery;
protected EntityManagerInterface $entityManager;

public function __construct(
EntityManagerInterface $entityManager,
OpeningRepositoryQuery $openingRepositoryQuery
EntityManagerInterface $entityManager
) {
$this->entityManager = $entityManager;
$this->openingRepositoryQuery = $openingRepositoryQuery;
}

public static function getSubscribedEvents()
@@ -36,7 +25,6 @@ class OpeningEventSubscriber implements EventSubscriberInterface

public function initOpenings()
{

}

}

+ 3
- 5
EventSubscriber/SettingEventSubscriber.php Voir le fichier

@@ -4,13 +4,11 @@ namespace Lc\CaracoleBundle\EventSubscriber;

use Doctrine\ORM\EntityManagerInterface;
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface;
use Lc\CaracoleBundle\Definition\SectionSettingDefinition;
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\Merchant\MerchantStore;
use Lc\CaracoleBundle\Repository\Section\SectionRepository;
use Lc\CaracoleBundle\Repository\Section\SectionStore;
use Lc\SovBundle\Solver\Setting\SettingSolver;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -20,7 +18,7 @@ class SettingEventSubscriber implements EventSubscriberInterface
{
protected EntityManagerInterface $entityManager;
protected MerchantSettingDefinitionInterface $merchantSettingDefinition;
protected SectionSettingDefinitionInterface $sectionSettingDefinition;
protected SectionSettingDefinition $sectionSettingDefinition;
protected MerchantStore $merchantStore;
protected SectionStore $sectionStore;
protected MerchantSettingFactory $merchantSettingFactory;
@@ -30,7 +28,7 @@ class SettingEventSubscriber implements EventSubscriberInterface
public function __construct(
EntityManagerInterface $entityManager,
MerchantSettingDefinitionInterface $merchantSettingDefinition,
SectionSettingDefinitionInterface $sectionSettingDefinition,
SectionSettingDefinition $sectionSettingDefinition,
MerchantStore $merchantStore,
SectionStore $sectionStore,
MerchantSettingFactory $merchantSettingFactory,

+ 5
- 14
Form/Setting/BaseSettingType.php Voir le fichier

@@ -2,36 +2,27 @@

namespace Lc\CaracoleBundle\Form\Setting;

use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface;
use Lc\CaracoleBundle\Definition\SectionSettingDefinition;
use Lc\CaracoleBundle\Model\Setting\MerchantSettingInterface;
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\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
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\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Lc\SovBundle\Form\Setting\BaseSettingType as SovBaseSettingType;

abstract class BaseSettingType extends SovBaseSettingType
{
protected $em;
protected $merchantSettingDefinition;
protected $sectionSettingDefinition;
protected EntityManagerInterface $em;
protected MerchantSettingDefinitionInterface $merchantSettingDefinition;
protected SectionSettingDefinition $sectionSettingDefinition;

public function __construct(
EntityManagerInterface $entityManager,
MerchantSettingDefinitionInterface $merchantSettingDefinition,
SectionSettingDefinitionInterface $sectionSettingDefinition
SectionSettingDefinition $sectionSettingDefinition
) {
$this->em = $entityManager;
$this->merchantSettingDefinition = $merchantSettingDefinition;

Chargement…
Annuler
Enregistrer