From: Michael M Slusarz Date: Fri, 17 Jul 2009 21:15:05 +0000 (-0600) Subject: Add getSiteLinks() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0392da871d2923ae81322d7cfa1947d909a69a8e;p=horde.git Add getSiteLinks() --- diff --git a/framework/Core/lib/Horde/Menu.php b/framework/Core/lib/Horde/Menu.php index 5e54896a2..2c9cbc48a 100644 --- a/framework/Core/lib/Horde/Menu.php +++ b/framework/Core/lib/Horde/Menu.php @@ -277,14 +277,26 @@ class Horde_Menu */ public function addSiteLinks() { + foreach ($this->getSiteLinks() as $menuitem) { + $this->addArray($menuitem); + } + } + + /** + * Get the list of site links to add to the menu. + * + * @return array A list of menu items to add. + */ + public function getSiteLinks() + { if (is_readable($this->_menufile)) { include $this->_menufile; if (isset($_menu) && is_array($_menu)) { - foreach ($_menu as $menuitem) { - $this->addArray($menuitem); - } + return $_menu; } } + + return array(); } /**