configstuff
This commit is contained in:
parent
ca0e7d300d
commit
c3411e5754
12 changed files with 243 additions and 121 deletions
35
src/Form/SystemConfigForm.php
Normal file
35
src/Form/SystemConfigForm.php
Normal 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,
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue