indigophp/fieldset

This package is abandoned and no longer maintained. No replacement package was suggested.

Custom fieldset features built around Fuel Fieldset and Validation package

dev-master / 0.1.x-dev 2015-05-06 00:32 UTC

This package is not auto-updated.

Last update: 2021-11-24 09:12:25 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score HHVM Status Total Downloads

Custom form features built around Fuel Fieldset and Validation package.

Install

Via Composer

$ composer require indigophp/fieldset

Usage

Create your entity which you want to use in the form:

/**
 * @Form
 */
class Entity
{
    /**
     * @Form\Field('text')
     */
    protected $property;
}

Create your metadata factory:

use Indigo\Fieldset\FieldsetManager;
use Indigo\Fieldset\Metadata\Driver\Annotation;
use Metadata\MetadataFactory;

$driver = new Annotation(/* instance of Doctrine\Common\Annotations\Reader */);
$factory = new MetadataFactory($driver);
$manager = new FieldsetManager($factory, /* instance of Fuel\Fieldset\Builder\BuilderInterface */);

$form = $manager->generateForm('Entity');
$manager->populateForm($entity, $form);
$validator = $manager->generateValidation('Entity');

Testing

$ phpspec run

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact us at security@indigophp.com.

Credits

License

The MIT License (MIT). Please see License File for more information.