Skip to content
Snippets Groups Projects
Unverified Commit ada5aed3 authored by Julius Härtl's avatar Julius Härtl
Browse files

Deprecate static methods and use Navigation manager


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent 39529851
No related branches found
No related tags found
No related merge requests found
......@@ -80,9 +80,9 @@ class TemplateLayout extends \OC_Template {
// Add navigation entry
$this->assign( 'application', '');
$this->assign( 'appid', $appId );
$navigation = \OC_App::getNavigation();
$navigation = \OC::$server->getNavigationManager()->getAll();
$this->assign( 'navigation', $navigation);
$settingsNavigation = \OC_App::getSettingsNavigation();
$settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings');
$this->assign( 'settingsnavigation', $settingsNavigation);
foreach($navigation as $entry) {
if ($entry['active']) {
......
......@@ -586,6 +586,7 @@ class OC_App {
* Returns the navigation
*
* @return array
* @deprecated 14.0.0 use \OC::$server->getNavigationManager()->getAll()
*
* This function returns an array containing all entries added. The
* entries are sorted by the key 'order' ascending. Additional to the keys
......@@ -600,6 +601,7 @@ class OC_App {
* Returns the Settings Navigation
*
* @return string[]
* @deprecated 14.0.0 use \OC::$server->getNavigationManager()->getAll('settings')
*
* This function returns an array containing all settings pages added. The
* entries are sorted by the key 'order' ascending.
......
......@@ -23,6 +23,6 @@
OC_Util::checkAdminUser();
OCP\JSON::callCheck();
$navigation = \OC_App::getNavigation();
$navigation = \OC::$server->getNavigationManager()->getAll();
OCP\JSON::success(['nav_entries' => $navigation]);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment