Elgg  Version 4.3
icon.php
Go to the documentation of this file.
1 <?php
12 $icon = elgg_extract('icon', $vars, '');
13 if ($icon === false) {
14  return;
15 }
16 
17 if ($icon !== '') {
18  echo $icon;
19  return;
20 }
21 
22 $icon_size = elgg_extract('icon_size', $vars, 'small');
23 $icon_entity = elgg_extract('icon_entity', $vars);
24 if ($icon_entity instanceof ElggEntity) {
26  return;
27 }
28 
29 $annotation = elgg_extract('annotation', $vars);
30 if (!$annotation instanceof ElggAnnotation) {
31  return;
32 }
33 
35 if (!$owner instanceof ElggEntity) {
36  return;
37 }
38 
getOwnerEntity()
Gets the that owns this entity.
$vars['class']
Display an icon from the FontAwesome library.
Definition: icon.php:8
if($icon===false) if($icon!== '') $icon_size
Definition: icon.php:22
$icon
Annotation icon.
Definition: icon.php:12
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:567
if(!$annotation instanceof ElggAnnotation) $owner
Definition: icon.php:34
$icon_entity
Definition: icon.php:23
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
if($icon_entity instanceof ElggEntity) $annotation
Definition: icon.php:29