phlexible / element-finder-bundle
phlexible 元素查找包
1.3.4
2017-04-19 21:25 UTC
Requires
- php: >=5.6.0
- doctrine/collections: ^1.3
- doctrine/dbal: ^2.0
- fluentdom/fluentdom: ^5.1
- phlexible/element-bundle: ~1.3
- phlexible/gui-bundle: ~1.3
- phlexible/tree-bundle: ~1.3
Requires (Dev)
README
PhlexibleElementFinderBundle 在 phlexible 中添加了对查找字段的支持。
安装
- 使用 composer 下载 PhlexibleElementFinderBundle
- 启用 Bundle
- 导入 PhlexibleElementFinderBundle 路由
- 更新你的数据库模式
- 清除 symfony 缓存
步骤 1:使用 composer 下载 PhlexibleElementFinderBundle
运行以下命令添加 PhlexibleElementFinderBundle
$ php composer.phar require phlexible/element-finder-bundle "~1.0.0"
Composer 会将包安装到你的项目的 vendor/phlexible
目录中。
步骤 2:启用 bundle
在 kernel 中启用 bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Phlexible\Bundle\ElementFinderBundle\PhlexibleElementFinderBundle(), ); }
步骤 3:导入 PhlexibleElementFinderBundle 路由
导入 PhlexibleElementFinderBundle 路由。
对于前端
# app/config/routing.yml phlexible_element_finder_render: resource: "@PhlexibleElementFinderBundle/Controller/RenderController.php" type: annotation
对于管理后端
# app/config/admin_routing.yml phlexible_element_finder_config: resource: "@PhlexibleElementFinderBundle/Controller/ConfigController.php" type: annotation
步骤 4:更新你的数据库模式
现在 bundle 已经设置好了,你需要最后更新你的数据库模式,因为元素查找包括需要在你的数据库中安装的实体。
对于 ORM 运行以下命令。
$ php app/console doctrine:schema:update --force
步骤 5:清除 symfony 缓存
如果你以环境 prod 访问 phlexible 应用程序,请清除缓存
$ php app/console cache:clear --env=prod