Download the PHP package uam/maintenance-bundle without Composer
On this page you can find all versions of the php package uam/maintenance-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package maintenance-bundle
UAMMaintenanceBundle
A symfony 2 bundle to manage maintenance periods for your symfony app.
Requirements
- Propel ORM
Installation
Add repository to your project's composer.json
:
Add the bundle to your project's composer.json
:
Run composer update
to install the bundle:
assuming composer.phar is in bin directory.
Enable the bundle in the app's kernel:
enable the UAMMaintenanceBundle, UAMDatatablesBundle and UAMTwigI18nBundle in app's kernel.
Add the bundle to the assetic configuration:
If your composer.json does not include the post-install or post-update installAssets
script handler, then run the following command:
or
Update your database schema
Run the following command to update the database schema.
Then run the below command to generate the migration file.
After generating migration file open the migration file and copy the query to create uam_maintenence
and uam_maintenance_i18n
table and run the query.
Or
run the command to execute generated sql.
Usage
Create maintenance periods
Display a warning to users about an implending maintenance period
Typically, if you have planned a maintenance operation in the near future, you want to publish a warning to your users on your app, in otder to let them know that the app will be unavailable during that time.
To do this with the UAMMaintenanceBndle, include the following code in the appropraite template of your app. If you want the warning to be displayed in all pages of your app, include this in the base template.
Customizing the "Under maintenance" page
Import routing file
override the layout
override the layout.html.twig
template into your app so that page/message displayed will be consistent with the style of your app.
Or you can also override the progress.html.twig
template for the "Under maintenence page".
Customizing the Admin pages
Import routing file
override the layout
override the layout.html.twig
template into your app so that admin pages displayed will be consistent with the style of your app.
To access the admin pages, the user must have the role ROLE_UAM_MAINTENANCE_ADMIN
.
Security
To access the admin pages
Admin pages are restricted to certain users. To access the admin pages, the user must have the role ROLE_UAM_MAINTENANCE_ADMIN
.
All versions of maintenance-bundle with dependencies
uam/datatables-bundle Version ^5.0
uam/twig-i18n-extension Version @stable