INavigationManager

interface OCP\INavigationManager
Manages the ownCloud navigation
Implemented by:OC\NavigationManager
Source:lib/public/INavigationManager.php#41

Constants

TYPE_APPS = link
Navigation entries of the app navigation
Source:lib/public/INavigationManager.php#47
Since:16.0.0
TYPE_SETTINGS = settings
Navigation entries of the settings navigation
Source:lib/public/INavigationManager.php#53
Since:16.0.0
TYPE_GUEST = guest
Navigation entries for public page footer navigation
Source:lib/public/INavigationManager.php#59
Since:16.0.0

Methods

public OCP\INavigationManager::add($entry)
Creates a new navigation entry
Source:

lib/public/INavigationManager.php#70

Parameters:
  • $entry (array | \Closure) Array containing: id, name, order, icon and href key
The use of a closure is preferred, because it will avoid

loading the routing of your app, unless required.

Returns:

void

Since:

6.0.0

public OCP\INavigationManager::setActiveEntry($appId)
Sets the current navigation entry of the currently running app
Source:

lib/public/INavigationManager.php#78

Parameters:
  • $appId (string) id of the app entry to activate (from added $entry)
Returns:

void

Since:

6.0.0

public OCP\INavigationManager::getAll($type=self::TYPE_APPS)
Get a list of navigation entries
Source:

lib/public/INavigationManager.php#87

Parameters:
  • $type (string) type of the navigation entries
Returns:

array

Since:

14.0.0