idci/extra-form-bundle
Composer 安装命令:
composer require idci/extra-form-bundle
包简介
Symfony bundle that expand existing FormType feature to allow a dynamic form generation
README 文档
README
ExtraFormBundle is a Symfony bundle that expand existing FormType features to allow dynamic forms generation.
This bundle provide:
- A builder to generate forms from a configuration array. This allow you to configure your forms in any format convertible in an array (yaml, json, etc) and dynamically generate your forms.
- A set of extra types (iban, captcha..) ready to use.
- An api that exposes all symfony form types as 'extra form types'
- An api that exposes all symfony validation constraints as 'extra form constraints'
Installation
Install this bundle using composer:
$ php composer require idci/extra-form-bundle:dev-master
Import the bundle configuration:
# app/config/config.yml imports: - { resource: '@IDCIExtraFormBundle/Resources/config/config.yml' }
That's it, you are ready to use the extra form builder.
Use the editor
If you need the api or the editor:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new FOS\RestBundle\FOSRestBundle(), new JMS\SerializerBundle\JMSSerializerBundle(), ); }
Enable the serializer:
# app/config/config.yml fos_rest: param_fetcher_listener: true # if you want to add configured types service: serializer: jms_serializer.serializer
Import the routes:
# app/config/routing.yml extra_form: resource: "@IDCIExtraFormBundle/Controller/" type: annotation
Install the assets:
php bin/console assets:install --symlink
The editor requires bootstrap and jquery. If you don't use it already in your project, just add the following lines in your views.
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src="{{ asset('bundles/idciextraform/js/vendor/jquery-2.2.4.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/idciextraform/js/vendor/bootstrap.min.js') }}"></script>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" type="text/css" href="{{ asset('bundles/idciextraform/css/bootstrap.min.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('bundles/idciextraform/css/bootstrap-theme.min.css') }}" />
{% endlbock %}
Use the configured types
You can register configured types via the editor. It allows you to access types with pre-configured fields.
Register doctrine bundle in your application kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), ); }
Then update the doctrine schema. It will create a table to register the configured types in database.
doctrine:schema:update --force
Documentation
Going further
Tests
We use docker and docker-compose to run the tests, along with a Makefile.
Install the bundle dev dependencies:
$ make composer-update
To execute unit tests:
$ make phpunit
idci/extra-form-bundle 适用场景与选型建议
idci/extra-form-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 65.65k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2014 年 10 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「configuration」 「form」 「dynamic」 「Form Type」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 idci/extra-form-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 idci/extra-form-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 idci/extra-form-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Configuration component
Flexslider slideshow content block for Silverstripe Elemental
EAV modeling package for Eloquent and Laravel.
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Write down your routing mapping at one place
A Laravel Filament Forms slug field.
统计信息
- 总下载量: 65.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 27
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-27