Elgg  Version 4.3
filter.php
Go to the documentation of this file.
1 <?php
15 $filter_tabs = (array) elgg_extract('filter', $vars, []);
16 foreach ($filter_tabs as $name => $tab) {
17  if (!is_array($tab)) {
18  continue;
19  }
20  if (!isset($tab['name'])) {
21  $tab['name'] = $name;
22  }
24 }
25 
26 $filter_id = elgg_extract('filter_id', $vars, 'filter');
27 
29 $menu_params['filter_id'] = $filter_id;
31 $menu_params['sort_by'] = 'priority';
32 $menu_params['class'] = 'elgg-menu-filter';
33 $menu_params['selected_item_name'] = elgg_extract('selected_item_name', $vars, elgg_extract('filter_value', $vars)); // for BC
34 
35 echo elgg_view_menu("filter:{$filter_id}", $menu_params);
if(!$user||!$user->canDelete()) $name
Definition: delete.php:22
static factory($options)
Create an ElggMenuItem from an associative array.
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:468
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:547
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24