/** * Check whether or not the module output is enabled * * @param string $moduleName Full module name * @return boolean */ public function isOutputEnabled($moduleName = null) { if ($moduleName === null) { $moduleName = $this->getModuleName(); } return !App_Main::getConfig('advanced-modules-disable-output-' . $moduleName); }
protected function getConfig() { if (!$this->_config) { $this->_config = App_Main::getConfig(); } return $this->_config; }
/** * Save the config options values */ public function submitAction() { $request = $this->getRequest(); $scope = $request->getParam('scope') ? $request->getParam('scope') : 'default'; $scopeId = $request->getParam('scope_id') ? $request->getParam('scope_id') : 0; $configData = $request->getParam('config_data'); //checkboxes should be checked for unchecked ones if (!isset($configData['web-secure-backend'])) { $configData['web-secure-backend'] = 0; } App_Main::getConfig()->saveConfigData($configData, $scope, $scopeId); $websiteCode = $this->getRequest()->getParam('config-website'); $this->_redirect('backend/config/index', array('website' => $websiteCode)); }
/** * Get the config model for the website or default config model if not found * * @param type $path * @return Core_Model_Config | string value */ public function getConfig($path = null) { if (!$this->_config) { $this->_config = App_Main::getConfig()->loadWebsiteConfig($this->getId()); } if (!empty($path)) { return $this->_config->getConfigData($path); } return $this->_config; }
protected function _shouldBeSecure($path) { return substr(App_Main::getConfig('web/unsecure/base_url'), 0, 5) === 'https' || App_Main::getConfig('web/secure/use_in_frontend') && substr(App_Main::getConfig('web/secure/base_url'), 0, 5) == 'https' && App_Main::getConfig()->shouldUrlBeSecure($path); }
protected function _shouldBeSecure($path) { return App_Main::getConfig('web-secure-backend'); }
public function getUseSession() { if (is_null($this->_useSession)) { $this->_useSession = App_Main::getConfig('session-sessionkey-url'); } return $this->_useSession; }
/** * Get the secure mode for backend * * @return bool */ public function getSecure() { return App_Main::getConfig('web-secure-backend'); }