Elgg  Version 2.3
section.php
Go to the documentation of this file.
1 <?php
13 $items = elgg_extract('items', $vars, array());
14 $headers = elgg_extract('show_section_headers', $vars, false);
16 $item_class = elgg_extract('item_class', $vars, '');
17 
18 if ($headers) {
19  $name = elgg_extract('name', $vars);
20  $section = elgg_extract('section', $vars);
21  echo '<h2>' . elgg_echo("menu:$name:header:$section") . '</h2>';
22 }
23 
24 $lis = '';
25 
26 if (is_array($items)) {
27  foreach ($items as $menu_item) {
28  $lis .= elgg_view('navigation/menu/elements/item', array(
29  'item' => $menu_item,
30  'item_class' => $item_class,
31  ));
32  }
33 }
34 
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_extract_class(array $array, $existing=[])
Extract class names from an array with key "class", optionally merging into a preexisting set...
Definition: elgglib.php:1396
$headers
Definition: section.php:14
$vars['entity']
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:208
$attrs['class']
Definition: section.php:15
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
if($headers) $lis
Definition: section.php:24
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1375
$items
Menu group.
Definition: section.php:13
$item_class
Definition: section.php:16