config->get($param); } /** * Make sidebar menu active * * @access public * @param string $controller * @param string $action * @param string $plugin * @return string */ public function checkMenuSelection($controller, $action = '', $plugin = '') { $result = strtolower($this->getRouterController()) === strtolower($controller); if ($result && $action !== '') { $result = strtolower($this->getRouterAction()) === strtolower($action); } if ($result && $plugin !== '') { $result = strtolower($this->getPluginName()) === strtolower($plugin); } return $result ? 'class="active"' : ''; } /** * Get plugin name from route * * @access public * @return string */ public function getPluginName() { return $this->router->getPlugin(); } /** * Get router controller * * @access public * @return string */ public function getRouterController() { return $this->router->getController(); } /** * Get router action * * @access public * @return string */ public function getRouterAction() { return $this->router->getAction(); } /** * Get javascript language code * * @access public * @return string */ public function jsLang() { return $this->config->getJsLanguageCode(); } /** * Get current timezone * * @access public * @return string */ public function getTimezone() { return $this->config->getCurrentTimezone(); } /** * Get session flash message * * @access public * @return string */ public function flashMessage() { $success_message = $this->flash->getMessage('success'); $failure_message = $this->flash->getMessage('failure'); if (! empty($success_message)) { return '
'.$this->helper->e($success_message).'
'; } if (! empty($failure_message)) { return '
'.$this->helper->e($failure_message).'
'; } return ''; } }