/** * @return Piwik_Menu */ public static function getInstance() { if (self::$instance == null) { $c = __CLASS__; self::$instance = new $c(); } return self::$instance; }
function isUrlFound($url) { $menu = Piwik_Menu::getInstance()->get(); foreach($menu as $mainMenuName => $subMenus) { foreach($subMenus as $subMenuName => $menuUrl) { if($menuUrl == $url) { return true; } } } return false; }