checkSettings() public static method

Checks the settings and optionally returns an array with warnings
public static checkSettings ( ) : array
return array
Example #1
0
 /**
  * Checks the settings and optionally returns an array with warnings
  *
  * @return array
  */
 public static function checkSettings()
 {
     $warnings = array();
     // check if debug-mode is active
     if (BackendModel::getContainer()->getParameter('kernel.debug')) {
         $warnings[] = array('message' => Language::err('DebugModeIsActive'));
     }
     // check if this action is allowed
     if (Authentication::isAllowedAction('Index', 'Settings')) {
         // check if the fork API keys are available
         if (self::get('fork.settings')->get('Core', 'fork_api_private_key') == '' || self::get('fork.settings')->get('Core', 'fork_api_public_key') == '') {
             $warnings[] = array('message' => sprintf(Language::err('ForkAPIKeys'), self::createURLForAction('Index', 'Settings')));
         }
     }
     // check for extensions warnings
     $warnings = array_merge($warnings, BackendExtensionsModel::checkSettings());
     return $warnings;
 }