Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace Lc\SovBundle\Field;
-
- use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
- use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
- use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
- use Symfony\Component\Form\Extension\Core\Type\TextType;
-
- /**
- * @author La clic ! <contact@laclic.fr>
- */
- final class BooleanField implements FieldInterface
- {
- use FieldTrait;
-
- public static function new(string $propertyName, ?string $label = null): self
- {
- return (new self())
- ->setProperty($propertyName)
- ->setLabel($label)
- ->setTemplatePath('@LcSov/adminlte/crud/field/boolean.html.twig')
- ->setFormType(CheckboxType::class);
- }
-
- }
|