lrotherfield/form
最新稳定版本:2.0.0
Composer 安装命令:
composer require lrotherfield/form
包简介
Additional components for the Symfony2 form components
关键字:
README 文档
README
##Additional Form Components
This collection of classes add functionality to the Symfony2 Form component.
###Installation
To install the form component simply add it to your composer.json requirements:
"require": {
"lrotherfield/form": "2.0.x-dev",
}
And then run composer.phar update
###Hidden entity type
To use the hidden entity type you need to register it as a service in your config.yml or a services.yml file:
services:
lrotherfield.form.type.hidden_entity:
class: Lrotherfield\Component\Form\Type\HiddenEntityType
arguments:
- @doctrine.orm.entity_manager
tags:
- { name: form.type, alias: hidden_entity }
You can use then use the type with the form builder:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
//...
->add('example', 'hidden_entity', array(
"class" => "Lrotherfield\\Bundle\\ExampleBundle\\Entity\\ExampleEntity"
));
;
}
The only additional requirement is the "class" option which must be a fully qualified namespace to the entity that you want to be used in the transformation
统计信息
- 总下载量: 175.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-08-01