Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

ekaragodin/MaintenanceMode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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', ),        
),

About

Maintenance mode for Yii framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages