configstuff

This commit is contained in:
lubiana 2025-06-14 20:21:36 +02:00
parent ca0e7d300d
commit c3411e5754
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 243 additions and 121 deletions

View file

@ -0,0 +1,35 @@
<?php
declare(strict_types=1);
namespace App\Form;
use App\Entity\SystemConfig;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class SystemConfigForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('value', TextType::class, [
'label' => 'Value',
'help' => 'The value of the system setting',
])
->add('description', TextType::class, [
'label' => 'Description',
'help' => 'Description of the system setting',
'disabled' => true,
]);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => SystemConfig::class,
]);
}
}