bukashk0zzz / booleantype-bundle
A simple Symfony bundle that adds boolean form field type.
Installs: 39 595
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Type:symfony-bundle
Requires
- php: >=7.2
- symfony/config: ^5.0|^6.0
- symfony/dependency-injection: ^5.0|^6.0
- symfony/form: ^5.0|^6.0
- symfony/http-kernel: ^5.0|^6.0
- symfony/yaml: ^5.0|^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^7.5
- slevomat/coding-standard: ^5.0
This package is auto-updated.
Last update: 2024-11-10 15:18:31 UTC
README
About
A simple Symfony bundle that adds boolean form field type.
Installation Symfony Flex
composer config extra.symfony.allow-contrib true
composer require bukashk0zzz/booleantype-bundle
Installation without Symfony Flex
composer require bukashk0zzz/booleantype-bundle
Add the bundle to app/AppKernel.php
$bundles = array( // ... other bundles new Bukashk0zzz\BooleanTypeBundle\Bukashk0zzzBooleanTypeBundle(), );
Configuration
Not needed.
Usage
Inside a FormType:
class AccountProfileType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('nameFirst', TextType::class, ['label' => 'First Name']) ->add('nameLast', TextType::class, ['label' => 'Last Name']) ->add('active', BooleanType::class, [ 'label' => 'User active?', 'required' => false, ]) ; } }
Copyright / License
See LICENSE