/**
  * Check there is an error
  * 
  * @return boolean
  */
 public static function hasError()
 {
     foreach (SelfTest::getResults() as $check) {
         if ($check['state'] == 'ERROR') {
             return true;
         }
     }
     return false;
 }
 /**
  * Prequisites action checks application requirement using the SelfTest
  * Libary
  *
  * (Step 2)
  */
 public function actionPrerequisites()
 {
     $checks = \humhub\libs\SelfTest::getResults();
     $hasError = false;
     foreach ($checks as $check) {
         if ($check['state'] == 'ERROR') {
             $hasError = true;
         }
     }
     // Render Template
     return $this->render('prerequisites', array('checks' => $checks, 'hasError' => $hasError));
 }
 /**
  * Self Test
  */
 public function actionSelfTest()
 {
     return $this->render('selftest', array('checks' => \humhub\libs\SelfTest::getResults(), 'migrate' => \humhub\commands\MigrateController::webMigrateAll()));
 }
 public function actionPrerequisites()
 {
     return $this->render('prerequisites', ['checks' => \humhub\libs\SelfTest::getResults()]);
 }