Elgg  Version 1.9
Namespaces | Functions
navigation.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Functions

 elgg_register_menu_item ($menu_name, $menu_item)
 Register an item for an Elgg menu. More...
 
 elgg_unregister_menu_item ($menu_name, $item_name)
 Remove an item from a menu. More...
 
 elgg_is_menu_item_registered ($menu_name, $item_name)
 Check if a menu item has been registered. More...
 
 elgg_get_menu_item ($menu_name, $item_name)
 Get a menu item registered for a menu. More...
 
 elgg_register_title_button ($handler=null, $name= 'add')
 Convenience function for registering a button to the title menu. More...
 
 elgg_push_breadcrumb ($title, $link=null)
 Adds a breadcrumb to the breadcrumbs stack. More...
 
 elgg_pop_breadcrumb ()
 Removes last breadcrumb entry. More...
 
 elgg_get_breadcrumbs ()
 Returns all breadcrumbs as an array of array('title' => 'Readable Title', 'link' => 'URL') More...
 
 _elgg_site_menu_setup ($hook, $type, $return, $params)
 Set up the site menu. More...
 
 _elgg_river_menu_setup ($hook, $type, $return, $params)
 Add the comment and like links to river actions menu private. More...
 
 _elgg_entity_menu_setup ($hook, $type, $return, $params)
 Entity menu is list of links and info on any entity private. More...
 
 _elgg_widget_menu_setup ($hook, $type, $return, $params)
 Widget menu is a set of widget controls private. More...
 
 _elgg_login_menu_setup ($hook, $type, $return, $params)
 Add the register and forgot password links to login menu private. More...
 
 _elgg_nav_init ()
 Navigation initialization private. More...
 

Function Documentation

_elgg_entity_menu_setup (   $hook,
  $type,
  $return,
  $params 
)

Entity menu is list of links and info on any entity private.

Definition at line 395 of file navigation.php.

_elgg_login_menu_setup (   $hook,
  $type,
  $return,
  $params 
)

Add the register and forgot password links to login menu private.

Definition at line 497 of file navigation.php.

_elgg_nav_init ( )

Navigation initialization private.

Definition at line 523 of file navigation.php.

_elgg_river_menu_setup (   $hook,
  $type,
  $return,
  $params 
)

Add the comment and like links to river actions menu private.

Definition at line 355 of file navigation.php.

_elgg_site_menu_setup (   $hook,
  $type,
  $return,
  $params 
)

Set up the site menu.

Handles default, featured, and custom menu items

private

Definition at line 270 of file navigation.php.

_elgg_widget_menu_setup (   $hook,
  $type,
  $return,
  $params 
)

Widget menu is a set of widget controls private.

Definition at line 446 of file navigation.php.

elgg_get_breadcrumbs ( )

Returns all breadcrumbs as an array of array('title' => 'Readable Title', 'link' => 'URL')

Returns
array Breadcrumbs
Since
1.8.0

Definition at line 253 of file navigation.php.

elgg_get_menu_item (   $menu_name,
  $item_name 
)

Get a menu item registered for a menu.

Parameters
string$menu_nameThe name of the menu
string$item_nameThe unique identifier for this menu item
Returns
ElggMenuItem|null
Since
1.9.0

Definition at line 157 of file navigation.php.

elgg_is_menu_item_registered (   $menu_name,
  $item_name 
)

Check if a menu item has been registered.

Parameters
string$menu_nameThe name of the menu
string$item_nameThe unique identifier for this menu item
Returns
bool
Since
1.8.0

Definition at line 131 of file navigation.php.

elgg_pop_breadcrumb ( )

Removes last breadcrumb entry.

Returns
array popped item.
Since
1.8.0

Definition at line 237 of file navigation.php.

elgg_push_breadcrumb (   $title,
  $link = null 
)

Adds a breadcrumb to the breadcrumbs stack.

Parameters
string$titleThe title to display
string$linkOptional. The link for the title.
Returns
void
Since
1.8.0

Definition at line 221 of file navigation.php.

elgg_register_menu_item (   $menu_name,
  $menu_item 
)

Register an item for an Elgg menu.

Warning
Generally you should not use this in response to the plugin hook: 'register', 'menu:<menu_name>'. If you do, you may end up with many incorrect links on a dynamic menu.
A menu item's name must be unique per menu. If more than one menu item with the same name are registered, the last menu item takes priority.
See also
elgg_view_menu() for the plugin hooks available for modifying a menu as it is being rendered.
ElggMenuItem::factory() is used to turn an array value of $menu_item into an ElggMenuItem object.
Parameters
string$menu_nameThe name of the menu: site, page, userhover, userprofile, groupprofile, or any custom menu
mixed$menu_itemAn ElggMenuItem or options for ElggMenuItem::factory()
Returns
bool False if the item could not be added
Since
1.8.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 73 of file navigation.php.

elgg_register_title_button (   $handler = null,
  $name = 'add' 
)

Convenience function for registering a button to the title menu.

The URL must be $handler/$name/$guid where $guid is the guid of the page owner. The label of the button is "$handler:$name" so that must be defined in a language file.

This is used primarily to support adding an add content button

Parameters
string$handlerThe handler to use or null to autodetect from context
string$nameName of the button
Returns
void
Since
1.8.0

Definition at line 188 of file navigation.php.

elgg_unregister_menu_item (   $menu_name,
  $item_name 
)

Remove an item from a menu.

Parameters
string$menu_nameThe name of the menu
string$item_nameThe unique identifier for this menu item
Returns
ElggMenuItem|null
Since
1.8.0

Definition at line 103 of file navigation.php.