jeriveromartinez / maintenance-site-bundle
This bundle allows your site in maintenance mode
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=5.3.2
- doctrine/doctrine-bundle: *
- doctrine/orm: *
- symfony/framework-bundle: ~2.7
- symfony/symfony: *
This package is not auto-updated.
Last update: 2024-05-25 16:55:58 UTC
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