Browse Source

add getValue

feature/symfony6.1
Charly 3 years ago
parent
commit
84cc243a36
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      EventSubscriber/SiteSettingEventSubscriber.php

+ 2
- 1
EventSubscriber/SiteSettingEventSubscriber.php View File

@@ -81,7 +81,8 @@ class SiteSettingEventSubscriber implements EventSubscriberInterface

$this->em->persist($entitySetting);
} else {
if ($entitySetting->getValue() === null
$methodGetValue = 'get' . ucfirst($setting['field']);
if ($entitySetting->$methodGetValue() === null
&& isset($setting['default'])
&& $setting['default'] !== null) {
$methodSetValue = 'set' . ucfirst($setting['field']);

Loading…
Cancel
Save