public static function getPerspectivesConfig()
{
if (\Zend_Registry::isRegistered("pimcore_config_perspectives")) {
$config = \Zend_Registry::get("pimcore_config_perspectives");
} else {
try {
$file = self::locateConfigFile("perspectives.php");
if (file_exists($file)) {
$config = new \Zend_Config(include $file);
} else {
throw new \Exception($file . " doesn't exist");
}
self::setPerspectivesConfig($config);
} catch (\Exception $e) {
Logger::info("Cannot find perspectives configuration, should be located at: " . $file);
if (is_file($file)) {
$m = "Your perspectives.php located at " . $file . " is invalid, please check and correct it manually!";
Tool::exitWithError($m);
}
$config = new \Zend_Config(self::getStandardPerspective());
self::setPerspectivesConfig($config);
}
}
return $config;
}