|
|
@@ -5,6 +5,7 @@ namespace Lc\SovBundle\Field; |
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; |
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; |
|
|
|
use Lc\SovBundle\Form\Type\FileManagerType; |
|
|
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; |
|
|
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; |
|
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType; |
|
|
|
|
|
|
@@ -21,10 +22,7 @@ final class BooleanField implements FieldInterface |
|
|
|
->setProperty($propertyName) |
|
|
|
->setLabel($label) |
|
|
|
->setTemplatePath('@LcSov/adminlte/crud/field/toggle.html.twig') |
|
|
|
->setFormType(ChoiceType::class) |
|
|
|
->setFormTypeOption('expanded', false) |
|
|
|
->setFormTypeOption('multiple', false) |
|
|
|
->setFormTypeOption('choices', ['En ligne' => 1, 'Hors ligne' => 0]); |
|
|
|
->setFormType(CheckboxType::class); |
|
|
|
} |
|
|
|
|
|
|
|
} |