29 $title = htmlspecialchars(
$entity->getDisplayName() ??
'', ENT_QUOTES,
'UTF-8',
false);
36 if (!isset(
$vars[
'width'])) {
40 if (!isset(
$vars[
'height'])) {
53 if (!empty(
$vars[
'width'])) {
57 if (!empty(
$vars[
'height'])) {
70 'title' =>
$entity->getDisplayName(),
74 if (!empty($link_class)) {
elgg_get_icon_sizes(string $entity_type=null, string $entity_subtype=null, $type= 'icon')
Returns a configuration array of icon sizes.
if(elgg_extract('use_link', $vars, true)) if(!isset($vars['width'])) if(!isset($vars['height'])) $img_params
if(elgg_extract('use_link', $vars, true)) if(!isset($vars['width'])) if(!isset($vars['height'])) if(!empty($img_class)) if(!empty($vars['width'])) if(!empty($vars['height'])) $img
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
if(!array_key_exists($size, $icon_sizes)) $vars['size']
if(!$entity instanceof ElggEntity) $icon_sizes
$entity
Generic icon view.
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.