Elgg  Version 4.3
Functions
breadcrumbs.php File Reference

Go to the source code of this file.

Functions

 elgg_push_breadcrumb ($text, $href=false)
 Breadcrumbs Elgg uses a breadcrumb stack. More...
 
 elgg_pop_breadcrumb ()
 Removes last breadcrumb entry. More...
 
 elgg_get_breadcrumbs (array $breadcrumbs=null)
 Returns all breadcrumbs as an array [ [ 'text' => 'Breadcrumb title', 'href' => '/path/to/page', ] ] More...
 
 elgg_push_entity_breadcrumbs (ElggEntity $entity, $link_self=true)
 Resolves and pushes entity breadcrumbs based on named routes. More...
 
 elgg_push_collection_breadcrumbs ($entity_type, $entity_subtype, ElggEntity $container=null, $friends=false)
 Resolves and pushes collection breadcrumbs for a container. More...
 

Function Documentation

elgg_get_breadcrumbs ( array  $breadcrumbs = null)

Returns all breadcrumbs as an array [ [ 'text' => 'Breadcrumb title', 'href' => '/path/to/page', ] ]

Breadcrumbs are filtered through the plugin hook [prepare, breadcrumbs] before being returned.

Parameters
array$breadcrumbsAn array of breadcrumbs If set, will override breadcrumbs in the stack
Returns
array
Since
1.8.0
See also
::class

Definition at line 71 of file breadcrumbs.php.

elgg_pop_breadcrumb ( )

Removes last breadcrumb entry.

Returns
array popped breadcrumb array or empty array
Since
1.8.0

Definition at line 38 of file breadcrumbs.php.

elgg_push_breadcrumb (   $text,
  $href = false 
)

Breadcrumbs Elgg uses a breadcrumb stack.

The page handlers (controllers in MVC terms) push the breadcrumb links onto the stack.

See also
elgg_push_breadcrumb() Adds a breadcrumb to the breadcrumbs stack.

See elgg_get_breadcrumbs() and the navigation/breadcrumbs view.

Parameters
string$textThe title to display. During rendering this is HTML encoded.
false | string$hrefOptional. The href for the title. During rendering links are normalized via elgg_normalize_url().
Returns
void
Since
1.8.0
See also
elgg_get_breadcrumbs()

Definition at line 21 of file breadcrumbs.php.

elgg_push_collection_breadcrumbs (   $entity_type,
  $entity_subtype,
ElggEntity  $container = null,
  $friends = false 
)

Resolves and pushes collection breadcrumbs for a container.

Parameters
string$entity_typeEntity type in the collection
string$entity_subtypeEntity subtype in the collection
ElggEntity | null$containerContainer/page owner entity
bool$friendsCollection belongs to container's friends?
Returns
void

Definition at line 128 of file breadcrumbs.php.

elgg_push_entity_breadcrumbs ( ElggEntity  $entity,
  $link_self = true 
)

Resolves and pushes entity breadcrumbs based on named routes.

Parameters
ElggEntity$entityEntity
bool$link_selfUse entity link in the last crumb
Returns
void

Definition at line 109 of file breadcrumbs.php.