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