jeriveromartinez/maintenance-site-bundle
Composer 安装命令:
composer require jeriveromartinez/maintenance-site-bundle
包简介
This bundle allows your site in maintenance mode
README 文档
README
##This bundle allows your site in maintenance mode for public or anonymous users, allowing you to see changes made if your user is allowed between roles
composer require jeriveromartinez/maintenance-site-bundle
...
new J3rm\MaintenanceSiteBundle\J3rmMaintenanceSiteBundle(),
##configurations parameter
j3rm_maintenance_site:
path_enable: [/admin,/login]
roles_enable_offline: [ROLE_USER,ROLE_ADMIN]
maintenance: true
Or
j3rm_maintenance_site:
path_enable: [/admin,/login]
roles_enable_offline: [ROLE_USER,ROLE_ADMIN]
database_offline: YourBundle:YourEntity:attributeName (the attribute most be a boolean)
- path_enable - The administration site url which you must include the login page.
- roles_enable_offline - The roles allowed to see the site in development mode.
- maintenance - boolean value to enable or not the maintenance mode.
- database_offline - It is defined where to catch the value for maintenance mode.
####this bundle redirect to offline page, for that add this to routing.yml
app_offline:
resource: "@J3rmMaintenanceSiteBundle/Controller/"
type: annotation
####create a error503.html.twig file into "Resources/TwigBundle/views/Exception/" and add anonymous permission in the firewall
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-18