raffaello/form-extensions-bundle

为symfony2添加额外的表单类型

安装: 16

依赖者: 0

建议者: 0

安全: 0

星星: 0

观察者: 2

分支: 31

语言:JavaScript

类型:symfony-bundle

v0.1 2013-12-28 17:36 UTC

This package is not auto-updated.

Last update: 2024-09-24 06:16:25 UTC


README

knpbundles.com Latest Stable Version Total Downloads

genemu/GenemuFormBundle启发的Admingenerator项目使用的symfony2表单扩展。

文档

要查看表单类型和扩展(以及相关说明)的完整列表,请参阅文档

安装

将以下内容添加到您的composer.json

"require": {
    "avocode/form-extensions-bundle": "dev-master"
}

然后在您的AppKernel.php中启用该bundle

<?php
// AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Avocode\FormExtensionsBundle\AvocodeFormExtensionsBundle(),
    );
}

在注册AdmingeneratorGeneratorBundle()之前,您必须注册AvocodeFormExtensionsBundle()。

为了让avocode/form-extensions-bundle表单正常工作,您需要编辑您的基模板,并包含静态和动态样式表和JavaScript。

{% block stylesheets %}
    {{ parent() }}   {# remove this line if you're not extending another template #}

    {% include 'AvocodeFormExtensionsBundle::stylesheets.html.twig' %}
    {% if form is defined %}
        {{ afe_form_stylesheet(form) }}
    {% endif %}
{% endblock %}

{% block javascripts %}
    {{ parent() }}   {# remove this line if you're not extending another template #}

    {% include 'AvocodeFormExtensionsBundle::javascripts.html.twig' %}
    {% if form is defined %}
        {{ afe_form_javascript(form) }}
    {% endif %}
{% endblock %}

需要翻译人员!

我们需要您的支持来翻译表单消息 :) 如果您想帮忙,请发起一个pull request并提交您语言的包。

许可证

有关许可证信息,请仔细阅读LICENSE文件。