/** * Adds breadcrumbs dynamically based on current module, submodule and action. * This might look a bit rough to the user. * Please prefer adding breadcrumbs manually via add(). */ public static function addDynamicBreadcrumbs() { $moduleName = strtolower(TargetRoute::getModuleName()); $submoduleName = strtolower(TargetRoute::getSubModuleName()); $actionName = TargetRoute::getActionNameWithoutPrefix(); if (isset($moduleName) and $moduleName !== 'controlcenter') { $url = 'index.php?mod=' . $moduleName; // Level 2 if ($submoduleName !== '') { $url .= '&sub=' . $submoduleName; $moduleName .= ' ' . $submoduleName; } self::add($moduleName, $url); // Level 3 if ($actionName !== '') { $url .= '&action=' . $actionName; self::add($actionName, $url); } } }
/** * Creates a cache_id. * * @return string Returns md5 string as cache_id. */ protected static function createCacheId() { $module = TargetRoute::getModuleName(); $submodule = TargetRoute::getSubModuleName(); $action = TargetRoute::getActionName(); return md5(strtolower($module . $submodule . $action)); }