diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-08 18:53:43 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-08 18:53:43 +0100 |
commit | 340d6fce11d6a66e042e060c514084a0a8ec8455 (patch) | |
tree | c7af074e44d0612b4820643a6d4a273342ce7dae /lib/app.php | |
parent | 96042f1e5b343ed75f59fc2997b7e54c07b557da (diff) | |
download | nextcloud-server-340d6fce11d6a66e042e060c514084a0a8ec8455.tar.gz nextcloud-server-340d6fce11d6a66e042e060c514084a0a8ec8455.zip |
Better way of getting the navigation entries for an app
Diffstat (limited to 'lib/app.php')
-rw-r--r-- | lib/app.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/app.php b/lib/app.php index 3a4e21e8cd1..c7e20a9fa96 100644 --- a/lib/app.php +++ b/lib/app.php @@ -286,6 +286,23 @@ class OC_App{ } /** + * @brief Get the navigation entries for the $app + * @param string $app app + * @return array of the $data added with addNavigationEntry + */ + public static function getAppNavigationEntries($app) { + if(is_file(self::getAppPath($app).'/appinfo/app.php')) { + $save = self::$navigation; + self::$navigation = array(); + require $app.'/appinfo/app.php'; + $app_entries = self::$navigation; + self::$navigation = $save; + return $app_entries; + } + return array(); + } + + /** * @brief gets the active Menu entry * @return string id or empty string * |