Elgg  Version master
breadcrumbs.php
Go to the documentation of this file.
1 <?php
19 $breadcrumbs = elgg_extract('breadcrumbs', $vars);
20 if ($breadcrumbs === false) {
21  return;
22 }
23 
24 if (is_string($breadcrumbs)) {
25  echo $breadcrumbs;
26  return;
27 }
28 
29 $breadcrumbs = elgg_view('navigation/breadcrumbs', $vars);
30 if (empty($breadcrumbs)) {
31  return;
32 }
33 
34 echo elgg_format_element('div', ['class' => 'elgg-layout-breadcrumbs'], $breadcrumbs);
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$vars
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
$breadcrumbs
Layout breadcrumbs.
Definition: breadcrumbs.php:19