add settings (stats, giphy)
This commit is contained in:
parent
d0d3502657
commit
2a1378464c
|
@ -7,6 +7,7 @@ use App\Core\EventSuscriber\SettingEventSubscriber as EventSubscriber;
|
|||
use App\Core\Setting\SettingManager;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
|
||||
/**
|
||||
* class SettingEventSubscriber.
|
||||
|
@ -52,20 +53,17 @@ class SettingEventSubscriber extends EventSubscriber
|
|||
);
|
||||
}
|
||||
|
||||
if ('blog_footer_p1' === $entity->getCode()) {
|
||||
if (in_array($entity->getCode(), ['giphy_api_key', 'stats_umami_url'])) {
|
||||
$builder->add(
|
||||
'value',
|
||||
TextareaType::class,
|
||||
TextType::class,
|
||||
[
|
||||
'label' => $entity->getLabel(),
|
||||
'attr' => [
|
||||
'rows' => 10,
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if ('blog_footer_p2' === $entity->getCode()) {
|
||||
if (in_array($entity->getCode(), ['blog_footer_p1', 'blog_footer_p2'])) {
|
||||
$builder->add(
|
||||
'value',
|
||||
TextareaType::class,
|
||||
|
|
Loading…
Reference in New Issue