|
|
@@ -59,7 +59,6 @@ class SettingEventSubscriber implements EventSubscriberInterface |
|
|
|
$this->initSettingsGeneric( |
|
|
|
'merchant', |
|
|
|
$this->merchantSettingDefinition->getSettings(), |
|
|
|
//TODO vérifier que ce soit bien les online que l'on souhaite |
|
|
|
$merchants, |
|
|
|
$this->merchantSettingFactory |
|
|
|
); |
|
|
@@ -79,11 +78,15 @@ class SettingEventSubscriber implements EventSubscriberInterface |
|
|
|
if($entities) { |
|
|
|
foreach ($entities as $entity) { |
|
|
|
|
|
|
|
$this->entityManager->refresh($entity); |
|
|
|
|
|
|
|
foreach ($settings as $category => $settingList) { |
|
|
|
foreach ($settingList as $settingName => $setting) { |
|
|
|
|
|
|
|
$entitySetting = $this->settingSolver->getSetting($entity, $settingName); |
|
|
|
|
|
|
|
if (!$entitySetting) { |
|
|
|
|
|
|
|
// gestion du cas des SectionSetting spécifiques à une section |
|
|
|
$createEntitySetting = true; |
|
|
|
if ($entity instanceof SectionInterface && isset($setting['section']) && $setting['section'] != $entity) { |
|
|
@@ -107,7 +110,7 @@ class SettingEventSubscriber implements EventSubscriberInterface |
|
|
|
|
|
|
|
$entitySetting = $factory->create($entity, $setting['name'], $text, $date, $file); |
|
|
|
|
|
|
|
$this->entityManager->persist($entitySetting); |
|
|
|
$this->entityManager->create($entitySetting); |
|
|
|
} |
|
|
|
} else { |
|
|
|
if ($this->settingSolver->getValue($entitySetting) === null |