public function init()
    {
        Yii::setAlias('@maintenance', $this->commandPath);
        if (!file_exists(Yii::getAlias('@maintenance'))) {
            FileHelper::createDirectory(Yii::getAlias('@maintenance'));
        }
        if (Yii::$app instanceof \yii\console\Application) {
            Yii::$app->controllerMap['maintenance'] = $this->consoleController;
        } else {
            if ($this->getIsEnabled()) {
                $this->filtering();
            }
        }
    }
public function init()
    {
        Yii::setAlias('@maintenance', $this->commandPath);
        if (!file_exists(Yii::getAlias('@maintenance'))) {
            FileHelper::createDirectory(Yii::getAlias('@maintenance'));
        }
        if (Yii::$app instanceof \yii\console\Application) {
            Yii::$app->controllerMap['maintenance'] = $this->consoleController;
        } else {
            if ($this->getIsEnabled()) {
                $this->filtering();
            }
        }
    }
public function init ( ) { Yii :: setAlias ( '@maintenance' , $ this -> commandPath ) ; if ( ! file_exists ( Yii :: getAlias ( '@maintenance' ) ) ) { FileHelper :: createDirectory ( Yii :: getAlias ( '@maintenance' ) ) ; } if ( Yii :: $ app instanceof \ yii \ console \ Application ) { Yii :: $ app -> controllerMap [ 'maintenance' ] = $ this -> consoleController ; } else { if ( $ this -> getIsEnabled ( ) ) { $ this -> filtering ( ) ; } } }
Initial component method.
@since 0.2.0
Initial component method .