Custom form features built around Fuel Fieldset and Validation package.
Via Composer
$ composer require indigophp/fieldset
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');
$ phpspec run
Please see CONTRIBUTING for details.
If you discover any security related issues, please contact us at security@indigophp.com.
The MIT License (MIT). Please see License File for more information.