Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/PluginsFunctions/Menu.php')
-rw-r--r--core/PluginsFunctions/Menu.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/PluginsFunctions/Menu.php b/core/PluginsFunctions/Menu.php
index d2b33675c6..73041c1d6d 100644
--- a/core/PluginsFunctions/Menu.php
+++ b/core/PluginsFunctions/Menu.php
@@ -60,6 +60,21 @@ class Piwik_Menu
}
}
+ 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;
+ }
/*
*
*/
@@ -163,6 +178,11 @@ class Piwik_Menu
}
}
+function Piwik_IsMenuUrlFound($url)
+{
+ return Piwik_Menu::getInstance()->isUrlFound($url);
+}
+
function Piwik_GetMenu()
{
return Piwik_Menu::getInstance()->get();