baconmanager / core-bundle
这是symfony2的包
1.1.4
2017-02-21 17:18 UTC
Requires
- friendsofsymfony/jsrouting-bundle: ^1.6
- fzaninotto/faker: ^1.6
- gedmo/doctrine-extensions: 2.4.*
- knplabs/knp-paginator-bundle: 2.5.*
- phpoffice/phpexcel: 1.8.1
This package is not auto-updated.
Last update: 2024-09-14 18:36:55 UTC
README
此包负责添加类以抽象化一些Symfony函数,例如具有行为的基础实体以创建<强>创建/更新强>和<强>软删除强>标准字段,以及基于ORM Doctrine2的数据库记录保存、更新和删除的基础表单处理器。
安装
要安装此包,只需运行以下命令:
$ composer require bacon/core-bundle
现在请将以下包添加到AppKernel.php文件中
<?php // app/AppKernel.php public function registerBundles() { // ... new Bacon\Bundle\CoreBundle\BaconCoreBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), // ... }
在文件<强>app/config/config.yml强>中添加以下配置
doctrine: --- orm: filters: softdeleteable: class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter enabled: true
在文件<强>app/config/services.yml强>的services部分添加以下行
services: gedmo.listener.softdeleteable: class: Gedmo\SoftDeleteable\SoftDeleteableListener tags: - { name: doctrine.event_subscriber, connection: default } calls: - [ setAnnotationReader, [ @annotation_reader ] ] gedmo.listener.timestampable: class: Gedmo\Timestampable\TimestampableListener tags: - { name: doctrine.event_subscriber, connection: default } calls: - [ setAnnotationReader, [ "@annotation_reader" ] ]
要配置KnpPaginatorBundle包,请查看包的配置,可通过访问此链接!