public static function getConfig($name = 'default') { return \erdiko\core\Config::getConfig($name)->getContext(); // return self::getConfigFile($file); }
/** * Switch context * Override existing context with the supplied context * @param string $contextName */ public function setContext($context) { $this->_config = Config::getConfig($context); $context = $this->_config->getContext(); $this->_contextConfig['theme'] = $context['theme']; // swap out theme configs // error_log("config: ".print_r($config, true)); }
/** * Config Action * @params array $arguments */ public function configAction($arguments = null) { // Add title $this->setTitles('Config'); // Add meta tags $this->addMeta('Erdiko config settings', 'description'); $config = Config::getConfig(); Config::getConfig(); // testing the singleton $context = $config->getContext(); // Get the context config settings for display $theme = $config->getTheme(); // This is just for debugging purposes. Best practice is to use view templates/blocks $body = "Here are the config settings.<br/>" . "<h3>Context: </h3><pre>" . print_r($context, true) . "</pre>" . "<h3>Theme: </h3><pre>" . print_r($theme, true) . "</pre>"; $this->setBodyContent($body); }