Elgg  Version 5.1
element.php
Go to the documentation of this file.
1 <?php
2 
3 $icon_name = elgg_extract('icon_name', $vars, false);
4 
5 $icon = '';
6 if ($icon_name !== false) {
8 }
9 
10 $content = elgg_extract('content', $vars, '');
11 
14  return;
15 }
16 
17 echo elgg_format_element('span', [
18  'class' => elgg_extract_class($vars),
19  'title' => elgg_extract('title', $vars),
20 ], $result);
$icon
Definition: element.php:5
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:276
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:176
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_icon(string $name, array $vars=[])
View an icon glyph.
Definition: views.php:1282
if($icon_name!==false) $content
Definition: element.php:10
$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
$icon_name
Definition: element.php:3
$result
Definition: element.php:12