2017 © Pedro Peláez
 

symfony-bundle form-bundle

Endroid Form Bundle for Symfony

image

endroid/form-bundle

Endroid Form Bundle for Symfony

  • Monday, April 16, 2018
  • by endroid
  • Repository
  • 1 Watchers
  • 1 Stars
  • 219 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 14 % Grown

The README.md

Form Bundle

By endroid, (*1)

Latest Stable Version Build Status Total Downloads Monthly Downloads License, (*2)

The Endroid FormBundle enables users to create basic forms through the Sonata Admin Bundle. It includes form configuration, storage of results, sending of notifications when a form is filled in and even the possibility to export form results., (*3)

knpbundles.com, (*4)

Requirements

  • Symfony

Installation

Use Composer to install the bundle., (*5)

``` bash $ composer require endroid/form-bundle, (*6)


Then enable the bundle via the kernel. ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = [ // ... new Endroid\FormBundle\EndroidFormBundle(), ]; }

Usage

Forms are created via Sonata Admin and can be rendered directly in your template as follows., (*7)

{{ render(controller('EndroidFormBundle:Form:show', { form: form })) }}

When a form is filled in correctly a result is generated and a form success event is dispatched. You can specify via Sonata Admin whether this result should be stored and if a confirmation email should be sent., (*8)

Extension

Event listeners

Event listeners exist for storing the result and sending a confirmation mail (depending on your settings). You can extend this functionality by adding your own listener or by overriding any of the existing., (*9)

/**
 * {@inheritdoc}
 */
public static function getSubscribedEvents()
{
    return [FormSuccessEvent::NAME => 'myHandler'];
}

/**
 * My custom form success handler.
 *
 * @param FormSuccessEvent $event
 */
public function myHandler(FormSuccessEvent $event)
{
    $result = $event->getResult();
    $form = $result->getForm();

    //...
}

And register it via the service container., (*10)

acme.event_listener.my_listener:
    class: Acme\EventListener\MyListener
    tags:
        - { name: kernel.event_subscriber }

Fields

New fields can be added by extending the Field class, creating a service definition for the the new field and adding the tag "endroid_form.field"., (*11)

acme.field.my_field:
    class: Acme\Entity\MyField
    tags:
        - { name: endroid_form.field }

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading., (*12)

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code., (*13)

The Versions

16/04 2018

dev-master

9999999-dev https://github.com/endroid/form-bundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

php form bundle symfony endroid

01/01 2017

1.1.0

1.1.0.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

form bundle symfony endroid

01/01 2017

1.x-dev

1.9999999.9999999.9999999-dev https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

 

The Development Requires

form bundle symfony endroid

28/12 2016

1.0.5

1.0.5.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

 

form bundle symfony endroid

28/12 2016

1.0.4

1.0.4.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

 

form bundle symfony endroid

28/12 2016

1.0.2

1.0.2.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

form bundle symfony endroid

28/12 2016

1.0.1

1.0.1.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

form bundle symfony endroid

09/07 2016

1.0.0

1.0.0.0 https://github.com/endroid/EndroidFormBundle

Endroid Form Bundle for Symfony

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

form bundle symfony endroid