mainio/c5-symfony-forms

This package is abandoned and no longer maintained. No replacement package was suggested.

Makes it possible to easily use the Symfony form builder within the concrete5 context. Utilizes the mainio/c5-twig-templates for easy building of the form view layer.

v0.1.2 2016-06-28 13:36 UTC

This package is not auto-updated.

Last update: 2021-11-27 02:32:18 UTC


README

This is a composer package that provides the possibility to use Symfony forms within concrete5. The advantages are obvious if you have read anything about them but to list a few:

  • Automatic form tags generation based on the defined fields
  • Automatic CSRF validation
  • Automatic field errors based on the defined validators
  • Automatic saving of forms directly into Doctrine entities
  • Less things to worry about in your controller logic
  • Streamlining your development pipeline with single pages
  • Making developing single page views with forms a lot faster
  • Less bugs in your code due to the nature of generalized and well tested components

This package depends on the twig templates package for building the form views:

https://github.com/mainio/c5pkg_twig_templates

How to use?

Add a composer.json file into your concrete5 package's directory. Into that file, add the following content:

{
    "require": {
        "mainio/c5-symfony-forms": "*"
    }
}

And then run composer install in the same directory. After this, add the following on top of your package controller (after the namespace definition):

include(dirname(__FILE__) . '/vendor/autoload.php');

An example implementation on how to use this is available here:

https://github.com/mainio/c5_symfony_forms_example

In order to use this, you will need to be running PHP 5.4 or newer in order to take advantage of the necessary trait provided by this package.

License

Licensed under the MIT license. See LICENSE for more information.

Copyright (c) 2015 Mainio Tech Ltd.