承接 qbbr/entity-hidden-type-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

qbbr/entity-hidden-type-bundle

最新稳定版本:2.0.4

Composer 安装命令:

composer require qbbr/entity-hidden-type-bundle

包简介

Symfony 2 entity hidden form type

README 文档

README

Latest Stable Version Total Downloads License

Installation

Step 1: Download the Bundle

Symfony >= 2.8

$ composer require qbbr/entity-hidden-type-bundle

Symfony < 2.8

$ composer require qbbr/entity-hidden-type-bundle 1.*

Step 2: Enable the Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Qbbr\EntityHiddenTypeBundle\EntityHiddenTypeBundle(),
        );

        // ...
    }

    // ...
}

Usage

<?php
// src/AppBundle/Form/Type/MyType.php
namespace AppBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
// for Symfony < 2.8 rm use type
use Qbbr\EntityHiddenTypeBundle\Form\Type\EntityHiddenType;

class MyType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // for < 2.8 use 'entity_hidden'
            ->add('parent', EntityHiddenType::class, [
                'class' => 'AppBundle\Entity\MyEntity',
            ]);
    }

    // for < 2.8 use getName()
    public function getBlockPrefix()
    {
        return 'my';
    }
}

统计信息

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

GitHub 信息

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

其他信息

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