add settings (stats, giphy)

This commit is contained in:
Simon Vieille 2021-05-12 16:13:03 +02:00
parent d0d3502657
commit 2a1378464c
1 changed files with 4 additions and 6 deletions

View File

@ -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,