2017 © Pedro Peláez
 

symfony-bundle booleantype-bundle

A simple Symfony bundle that adds boolean form field type.

image

bukashk0zzz/booleantype-bundle

A simple Symfony bundle that adds boolean form field type.

  • Saturday, April 21, 2018
  • by Bukashk0zzz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,319 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 18743 % Grown

The README.md

Symfony BooleanType Bundle

Build Status Code Coverage Scrutinizer Code Quality License Latest Stable Version Total Downloads, (*1)

About

A simple Symfony bundle that adds boolean form field type., (*2)

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, (*3)

$bundles = array(
    // ... other bundles
    new Bukashk0zzz\BooleanTypeBundle\Bukashk0zzzBooleanTypeBundle(),
);

Configuration

Not needed., (*4)

Usage

Inside a FormType:, (*5)

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,
            ])
        ;
    }
}

See LICENSE, (*6)

The Versions