INavigationManager

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

Constants

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

Methods

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

lib/public/INavigationManager.php#75

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#83

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

void

Since:

6.0.0

public OCP\INavigationManager::getActiveEntry()
Get the current navigation entry of the currently running app
Source:lib/public/INavigationManager.php#90
Returns:string
Since:20.0.0
public OCP\INavigationManager::getAll($type=self::TYPE_APPS)
Get a list of navigation entries
Source:

lib/public/INavigationManager.php#99

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

array

Since:

14.0.0