ekaragodin/yii-maintenance-mode

This package is abandoned and no longer maintained. No replacement package was suggested.

Maintenance mode for Yii framework.

dev-master 2014-08-24 03:16 UTC

This package is auto-updated.

Last update: 2020-02-09 04:01:49 UTC


README

#Maintenance mode for Yii framework.

##Install Copy extension to your folder path/to/extensions.

Or add

"ekaragodin/yii-maintenance-mode": "dev-master"

to the require section of your composer.json file.

Add to config/main.php:

'preload' => array('log', 'maintenanceMode'),
...
'components' => array(
        'maintenanceMode' => array(
            'class' => 'application.extensions.MaintenanceMode.MaintenanceMode',
        ),
        ...
),

##Options

'maintenanceMode' => array(
    'class' => 'application.extensions.MaintenanceMode.MaintenanceMode',
    'enabledMode' => true,
    'message' => 'Hello!',
    // or
    //'capUrl' => 'site/contact',
    // allowed users
    'users' => array('admin', ),
    // allowed roles
    'roles' => array('Administrator', ),
    // allowed IP
    'ips' => array('123.456.789.000', ),        
    // allowed urls
    'urls' => array('/site/login', '/login', ),        
),