GcFrontend\Controller\InstallController::checkInstall PHP Method

checkInstall() protected method

Check install step
protected checkInstall ( string $step ) : Zend\View\Model\ViewModel
$step string Installation step
return Zend\View\Model\ViewModel
    protected function checkInstall($step)
    {
        $session = $this->getSession();
        if ($step == 1) {
            return true;
        }
        //step 2 or higher
        if (empty($session['install']) or empty($session['install']['lang'])) {
            return $this->redirect()->toRoute('install');
        }
        //Higher than 4
        if ($step > 4) {
            if (empty($session['install']['db'])) {
                return $this->redirect()->toRoute('install/database');
            }
        }
        //Higher than 5
        if ($step > 5) {
            if (empty($session['install']['configuration'])) {
                return $this->redirect()->toRoute('install/configuration');
            }
        }
    }