wearejust / form-bundle
此包已被放弃,不再维护。没有建议替代包。
为 Symfony 表单添加额外功能
0.8.3
2019-08-20 14:56 UTC
Requires
- php: >=7.0
- symfony/framework-bundle: ~2.7|~3.0|~4.0
Suggests
- presta/image-bundle: Allows for cropping images, use version ^1.7
- vich/uploader-bundle: Allows for saving files to entities, use version ^1.6
README
此包为 Symfony 表单添加额外功能
安装
步骤 1: 下载包
打开命令行,进入项目目录,并执行以下命令以下载此包的最新稳定版本
$ composer require wearejust/form-bundle "~0.1"
此命令要求您全局安装了 Composer,如 Composer 文档中的安装章节所述。
步骤 2: 启用包
然后,将包添加到项目 app/AppKernel.php
文件中注册的包列表中,以启用该包
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Wearejust\FormBundle\WearejustFormBundle(), ); // ... } // ... }
步骤 3: 配置(可选/参考)
// config.yml wearejust_form: form: theme: WearejustFormBundle:Form:fields.html.twig bundles: prestaimage: true // Defaults to true use PrestaImageBundle (see suggests in composer.json) libraries: switchery: true
// routing.yml wearejust_form: resource: . type: wearejust_form