gibilogic/hidden-entity-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gibilogic/hidden-entity-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require gibilogic/hidden-entity-bundle

包简介

GiBiLogic Hidden Entity Bundle

README 文档

README

A small bundle that contains a ready-to-use hidden entity form type for Symfony 2.

This is basically an hidden form type that's used to store an entity ID; a transformer will manage the ID-to-entity and entity-to-ID conversions by using the ObjectManager of Doctrine ORM.

Installation

Add this bundle to the composer.json of your application with the console command:

composer require gibilogic/hidden-entity-bundle

Or, if you are using composer.phar, use the console command:

php composer.phar require gibilogic/hidden-entity-bundle

Usage

Inside one of your form, simply add a new hidden_entity field to the builder:

/**
 * {@inheritdoc}
 */
public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        // ..
        ->add('category', 'hidden_entity', array(
            'required' => true,
            'class' => 'AppBundle:Category'
        ))
        // ..
    ;
}

The class options is mandatory and must contain your entity's class name (as shown in the example above).

统计信息

  • 总下载量: 1.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-15