Elgg  Version master
filter.php
Go to the documentation of this file.
1 <?php
18 $filter = elgg_extract('filter', $vars);
19 if ($filter === false || $filter === '') {
20  // filter disabled
21  return;
22 }
23 
24 if (!isset($filter) || is_array($filter)) {
25  // make a filter menu
26  $filter = elgg_view('navigation/filter', $vars);
27 }
28 
29 if (!$filter) {
30  // no content for the filter layout
31  return;
32 }
33 
34 echo elgg_format_element('div', ['class' => 'elgg-layout-filter'], $filter);
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
$filter
Layout content filter.
Definition: filter.php:18
$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