public function maintenanceCheck($action, $warnings)
    {
        if ($this->module->podiumConfig->get('maintenance_mode') != '1') {
            return false;
        }
        if ($action->id === 'maintenance') {
            return false;
        }
        if ($warnings) {
            foreach ($warnings as $warning) {
                if ($warning === static::warnings()['maintenance']) {
                    if (!User::can(Rbac::ROLE_ADMIN)) {
                        return $this->redirect(['forum/maintenance']);
                    }
                    return false;
                }
            }
        }
        $this->warning(static::warnings()['maintenance'], false);
        if (!User::can(Rbac::ROLE_ADMIN)) {
            return $this->redirect(['forum/maintenance']);
        }
        return false;
    }
public function maintenanceCheck($action, $warnings)
    {
        if ($this->module->podiumConfig->get('maintenance_mode') != '1') {
            return false;
        }
        if ($action->id === 'maintenance') {
            return false;
        }
        if ($warnings) {
            foreach ($warnings as $warning) {
                if ($warning === static::warnings()['maintenance']) {
                    if (!User::can(Rbac::ROLE_ADMIN)) {
                        return $this->redirect(['forum/maintenance']);
                    }
                    return false;
                }
            }
        }
        $this->warning(static::warnings()['maintenance'], false);
        if (!User::can(Rbac::ROLE_ADMIN)) {
            return $this->redirect(['forum/maintenance']);
        }
        return false;
    }
public function maintenanceCheck ( $ action , $ warnings ) { if ( $ this -> module -> podiumConfig -> get ( 'maintenance_mode' ) != '1' ) { return false ; } if ( $ action -> id === 'maintenance' ) { return false ; } if ( $ warnings ) { foreach ( $ warnings as $ warning ) { if ( $ warning === static :: warnings ( ) [ 'maintenance' ] ) { if ( ! User :: can ( Rbac :: ROLE_ADMIN ) ) { return $ this -> redirect ( [ 'forum/maintenance' ] ) ; } return false ; } } } $ this -> warning ( static :: warnings ( ) [ 'maintenance' ] , false ) ; if ( ! User :: can ( Rbac :: ROLE_ADMIN ) ) { return $ this -> redirect ( [ 'forum/maintenance' ] ) ; } return false ; }
Performs maintenance check.
@param Action $action the action to be executed.
@param array $warnings Flash warnings
@return bool|Response
@since 0.2
Performs maintenance check .