2017 © Pedro Peláez
 

library bitfield-type-bundle

Adds a bitfield type to use in Symfony Forms

image

colinfrei/bitfield-type-bundle

Adds a bitfield type to use in Symfony Forms

  • Tuesday, July 17, 2018
  • by colinfrei
  • Repository
  • 1 Watchers
  • 4 Stars
  • 886 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

BitField Form Type Bundle

Installation

Add the following to your deps file:, (*1)

[ColinFreiBitFieldFormTypeBundle]
    git=http://github.com/colinfrei/Symfony-Bitfield-Form-Type-Bundle.git
    target=bundles/ColinFrei/BitFieldTypeBundle

Register the ColinFrei namespace in the app/autoload.php file, by adding this line in the $loader->registerNamespaces(array( array:, (*2)

'ColinFrei'        => __DIR__.'/../vendor/bundles',

Register the bundle in your app/AppKernel.php file, by adding this line in the bundles array in the registerBundles() function:, (*3)

new ColinFrei\BitFieldTypeBundle\ColinFreiBitFieldTypeBundle(),

Usage

Use the BitfieldType class when adding fields to the form, and pass in an array of options, like the type line in this example from the Symfony documentation:, (*4)

use ColinFrei\BitFieldTypeBundle\Form\Type\BitfieldType;

$form = $this->createFormBuilder($task)
    ->add('task', 'text')
    ->add('dueDate', 'date')
    ->add('type', BitfieldType::class, array(
        'choices' => array('Annoying' => '1', 'Fun' => '2', 'Cool' => '4', 'Takes a while' => '8'),
        'choices_as_values' => true
    )
    ->getForm();

The Versions

17/07 2018

dev-master

9999999-dev

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei

17/07 2018

2.7.0

2.7.0.0

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei

27/02 2015

2.6.3

2.6.3.0

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei

22/02 2015

2.6.1

2.6.1.0

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei

30/01 2015

2.6.0

2.6.0.0

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei

19/11 2012

2.1.0

2.1.0.0

Adds a bitfield type to use in Symfony Forms

  Sources   Download

MIT

The Requires

 

by Colin Frei