Elgg  Version 6.0
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 
21  if (!isset($tab['name'])) {
22  $tab['name'] = $name;
23  }
24 
26 }
27 
28 $filter_id = elgg_extract('filter_id', $vars, 'filter');
29 
31 $menu_params['filter_id'] = $filter_id;
33 $menu_params['sort_by'] = 'priority';
34 $menu_params['class'] = 'elgg-menu-filter';
35 $menu_params['selected_item_name'] = elgg_extract('selected_item_name', $vars, elgg_extract('filter_value', $vars)); // for BC
36 
37 echo elgg_view_menu("filter:{$filter_id}", $menu_params);
if(!$user||!$user->canDelete()) $name
Definition: delete.php:22
static factory(array $options)
Create an ElggMenuItem from an associative array.
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_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:441
$vars
Definition: theme.php:5