symfony2admingenerator / form-extensions-bundle
Add additional form types to symfony2
Installs: 29 308
Dependents: 0
Suggesters: 2
Security: 0
Stars: 13
Watchers: 9
Forks: 13
Open Issues: 12
Language:JavaScript
Type:symfony-bundle
Requires
- php: >=8.1.0
- symfony/config: ~4.4|~5.4|~6.2
- symfony/dependency-injection: ~4.4|~5.4|~6.2
- symfony/event-dispatcher: ~4.4|~5.4|~6.2
- symfony/form: ~4.4|~5.4|~6.2
- symfony/http-foundation: ~4.4|~5.4|~6.2
- symfony/http-kernel: ~4.4|~5.4|~6.2
- symfony/options-resolver: ~4.4|~5.4|~6.2
- symfony/property-access: ~4.4|~5.4|~6.2
- symfony/translation: ~4.4|~5.4|~6.2
- symfony/translation-contracts: ~1.0|~2.0|~3.0
- symfony/twig-bridge: ~4.4|~5.4|~6.2
- symfony/validator: ~4.4|~5.4|~6.2
- symfony2admingenerator/form-bundle: ~1.7|~2.0
- twig/twig: ^2.15.3||^3.4.3
Suggests
- liip/imagine-bundle: Apply filters on preview images
- symfony2admingenerator/generator-bundle: The missing symfony2 admin generator
- vich/uploader-bundle: (>= 0.10.0) Bundle to ease file uploads with ORM entities and ODM documents
- v4.0.1
- v4.0.0
- dev-master / 3.x-dev
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.1
- v2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0
- v2.0-beta.24
- v2.0-beta.23
- v2.0-beta.22
- v2.0-beta.21
- v2.0-beta.20
- v2.0-beta.19
- v2.0-beta.18
- v2.0-beta.17
- v2.0-beta.16
- v2.0-beta.15
- v2.0-beta.14
- v2.0-beta.13
- v2.0-beta.12
- v2.0-beta.11
- v2.0-beta.10
- v2.0-beta.9
- v2.0-beta.8
- v2.0-beta.7
- v2.0-beta.6
- v2.0-beta.5
- v2.0-beta.4
- v2.0-beta.3
- v2.0-beta.2
- v2.0-beta.1
- dev-fix-extensions-return-type
This package is auto-updated.
Last update: 2024-11-07 21:55:35 UTC
README
Symfony2 form extensions for Admingenerator project inspired by genemu/GenemuFormBundle.
Documentation
For a full list of form types and extensions (and related notes) see documentation.
Installation
Add this to your composer.json
:
"require": { "symfony2admingenerator/form-extensions-bundle": "^2.0" }
For Symfony version lower than 2.7 or Twig lower than 1.12 add the following to your composer.json
:
"require": { "symfony2admingenerator/form-extensions-bundle": "v2.0-beta.21" }
And then enable the bundle in your AppKernel.php
:
<?php // AppKernel.php public function registerBundles() { $bundles = array( // ... new Admingenerator\FormBundle\AdmingeneratorFormBundle(), new Admingenerator\FormExtensionsBundle\AdmingeneratorFormExtensionsBundle(), // AdmingeneratorGeneratorBundle is optional, however if you're useing it // make sure it is loaded AFTER AdmingeneratorFormExtensionsBundle new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(), ); } ?>
To make symfony2admingenerator/form-extensions-bundle
forms work, you need to edit your base
template, and include static and dynamic stylesheets and javascripts.
For Admingenerator users:
{% extends 'AdmingeneratorGeneratorBundle::base_admin.html.twig' %} {% block stylesheets %} {{ parent() }} {% include '@AdmingeneratorFormExtensions/stylesheets.html.twig' %} {% if form is defined and form is not empty %} {{ form_css(form) }} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% include '@AdmingeneratorFormExtensions/javascripts.html.twig' %} {% if form is defined and form is not empty %} {{ form_js(form) }} {% endif %} {% endblock %}
For others:
{% block stylesheets %} {% include '@AdmingeneratorFormExtensions/stylesheets.html.twig' %} {% if form is defined and form is not empty %} {{ form_css(form) }} {% endif %} {% endblock %} {% block javascripts %} {% include '@AdmingeneratorFormExtensions/javascripts.html.twig' %} {% if form is defined and form is not empty %} {{ form_js(form) }} {% endif %} {% endblock %}
Note that the templates above are only usable if you've configured assetic for you project (with the correct filters enabled, uglifyjs2
and uglifycss
). This bundle also offers a view without filters and without assetic. Simple append _assetic_basic
or assetic_less
to the template name.
Configure assetic packages (only if you use base.html.twig template)
Symfony <2.7:
framework: templating: packages: formextensions_css: version: 1.0 version_format: "%%1$s?v%%2$s" formextensions_js: version: 1.0 version_format: "%%1$s?v%%2$s"
Symfony 2.7 or higher:
framework: assets: packages: formextensions_css: version: 1.0 version_format: "%%1$s?v%%2$s" formextensions_js: version: 1.0 version_format: "%%1$s?v%%2$s"
Translators needed!
We need your support to translate forms messages :) If you want to help open a pull request and submit a package for your language.
License
For license information read carefully LICENSE
file.