chaplean / cms-bundle
用于分叉的基础Bundle
v8.0.3
2019-07-10 06:08 UTC
Requires
- php: >=7.1
- doctrine/doctrine-bundle: ^1.6
- doctrine/doctrine-fixtures-bundle: ^2.2 || ^3.0
- doctrine/orm: ^2.5
- friendsofsymfony/jsrouting-bundle: ^1.5 || ^2.0
- friendsofsymfony/rest-bundle: ^2.1
- jms/serializer-bundle: ^1.1 || ^2.0
- sensio/framework-extra-bundle: ^5.0.0
- symfony/assetic-bundle: ^2.3
- symfony/monolog-bundle: ^3.0 || ^4.0
- symfony/symfony: ^3.0 || ^4.0
- willdurand/js-translation-bundle: ^2.2
Requires (Dev)
- chaplean/codeship-scripts: ^1.0
- chaplean/coding-standard: ^1.1
- chaplean/unit-bundle: ^7.0
- incenteev/composer-parameter-handler: ^2.0
- mockery/mockery: dev-master
- sensio/distribution-bundle: ^4.0 || ^5.0
- symfony/console: ^3.0 || ^4.0
- symfony/phpunit-bridge: ^4.0
- symfony/var-dumper: ^3.0 || ^4.0
- dev-master
- v8.0.3
- v8.0.2
- v8.0.1
- v8.0.0
- v7.0.2
- v7.0.1
- v7.0.0
- v6.0.5
- v6.0.4
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.4.1
- v3.4.0
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.2
- v3.0.1
- v3.0.0
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/composer/twig/twig-2.12.5
- dev-dependabot/npm_and_yarn/Resources/public/libs/bootstrap-sass-official/node-sass-4.14.1
- dev-dependabot/composer/symfony/symfony-3.4.35
- dev-dependabot/composer/symfony/phpunit-bridge-4.1.12
- dev-dependabot/npm_and_yarn/Resources/public/libs/bootstrap-sass-official/ejs-2.7.1
- dev-dev
This package is auto-updated.
Last update: 2024-08-29 04:49:09 UTC
README
先决条件
此版本的Bundle需要Symfony 2.8+。
安装
在 composer.json
中包含 ChapleanCmsBundle
composer require chaplean/cms-bundle
在 AppKernel.php
中添加bundle
<?php //... public function registerBundles() { return array ( //... new Chaplean\Bundle\CmsBundle\ChapleanCmsBundle(), ); }
步骤
在 config.yml 中添加配置
chaplean_cms: modules: block: boolean|array # Required, action available: ['add', 'remove'] page: boolean|array # Required, action available: ['add', 'remove'] post: category: boolean|array # Required, type available ['news', 'testimonial', 'video', 'zoom'] action: boolean|array # Required, action available: ['add', 'duplicate', 'remove'] media: boolean # Required template: back_layout: # Optional (default: 'ChapleanCmsBundle::layout-backoffice.html.twig'), for override default back layout (add a menu in sidebar for example) front_layout: # Required view extended by page/post view (example: 'ChapleanCmsBundle::layout-frontoffice.html.twig') front_route: # Optional (default: 'app_front'), route name for return to main site back_landing_route: # Optional (default: 'cms_back_home'), landing page to redirect to when requesting the backoffice without specific page logo_path: # Optional (default: ''), path of logo top left page_index: # Optional (default: 'ChapleanCmsBundle:Front/Page:index.html.twig'), Custom frontend page list page_view: # Optional (default: 'ChapleanCmsBundle:Front/Page:view.html.twig'), Custom frontend page post_index: # Optional (default: 'ChapleanCmsBundle:Front/Post:index.html.twig'), Custom frontend post list post_view: # Optional (default: 'ChapleanCmsBundle:Front/Post:view.html.twig'), Custom frontend post
[注意]: front_layout
必须包含一个名为 content
的twig块,否则请查看 page_index
、page_view
、post_index
、post_view
,如果您想为这些模块覆盖默认视图。
为doctrine添加 ChapleanCmsBundle
doctrine: orm: #... entity_managers: app: mappings: mappings: #... ChapleanCmsBundle: ~
为assetic添加 ChapleanCmsBundle
assetic: #... bundles: ['ChapleanCmsBundle']
在 routing.yml 中添加路由
chaplean_cms: resource: "@ChapleanCmsBundle/Resources/config/routing.yml" chaplean_cms_rest: type: rest resource: "@ChapleanCmsBundle/Resources/config/routing_rest.yml" prefix: /rest/
添加迁移
<?php // Add this in migration /** @var Kernel $kernel */ $kernel = $this->container->get('kernel'); $application = new Application($kernel); $application->setAutoExit(false); $options = array('command' => 'doctrine:fixtures:load', '--fixtures' => 'vendor/chaplean/cms-bundle/Chaplean/Bundle/CmsBundle/DataFixtures/ORM', '--append' => true); $application->run(new ArrayInput($options));
构建翻译
php bin/console bazinga:js-translation:dump