xiidea/easy-form-bundle

A Symfony2 Bundle provide some extra form types.

Installs: 51

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony2-bundle

dev-master 2016-01-25 08:43 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:19:25 UTC


README

A Symfony2 Bundle provide some extra form type.

Install

  1. Add EasyFormBundle in your composer.json
  2. Enable the Bundle
  3. Use the registered types

1. Add EasyFormBundle in your composer.json

Add EasyFormBundle in your composer.json:

{
    "require": {
        "xiidea/easy-form-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update xiidea/easy-form-bundle

Composer will install the bundle to your project's vendor/xiidea directory.

2. Enable the Bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Xiidea\EasyFormBundle\XiideaEasyFormBundle(),
    );
}

3. Use the registered types.

Now you can use the registered types in ordinary way. currently available types are:

  • hidden_entity

you can add a "hidden_entity" field to the form as follow:

    $builder
            ->add('fieldName', 'hidden_entity', array(
                'class' => 'Acme\DemoBundle\Entity\YourEntity'
            ));