承接 wuestkamp/alterable-form-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wuestkamp/alterable-form-bundle

Composer 安装命令:

composer require wuestkamp/alterable-form-bundle

包简介

Allows Symfony Forms to be altered based on YAML configuration files

README 文档

README

This bundle lets you alter existing Symfony Forms based on yml config values. If you want to create forms dynamically from yml check out LinioIT/dynamic-form-bundle.

Installation

This plugin requires Symfony ^2.8|^3.0|^4.0

{
    "require": {
        "wuestkamp/alterable-form-bundle": "^0.2"
    }
}

for SF < 4.0

Add the bundle to your AppKernel.php

new Wuestkamp\AlterableFormBundle\AlterableFormBundle();

If you are using 2.8 you need to create your forms (which you want to alter) using the classname like this instead of a name string to be able to use this bundle:

$form = $this->createForm(MyForm::class, $myObject);

for SF >= 4.0

Add this to config/bundles.php:

\Wuestkamp\AlterableFormBundle\AlterableFormBundle::class => ['all' => true],

create file config/packages/alterable_form.yml.

Usage

Define yml configuration like this:

alterable_form:
    forms:
        Namespace\Bundle\Form\MyForm:
            fields:
                first_name:
                    options:
                        required: false
                last_name:
                    add: false # default is true
        Namespace\Bundle\Form\MyOtherForm:
            fields:
                email:
                    options:
                        attr: {class: 'css_class'}

Tests

Git clone this repo then composer install and ./vendor/phpunit/phpunit/phpunit -c .

统计信息

  • 总下载量: 1.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固