Elgg  Version 4.3
Go to the documentation of this file.
1 <?php
13 $entity = elgg_extract('entity', $vars);
14 if (!$entity instanceof ElggEntity) {
15  return;
16 }
18 $title = elgg_extract('title', $vars, '');
19 if ($title === '') {
20  $title = elgg_view('object/elements/summary/title', $vars);
21 }
24 if (!isset($icon)) {
26 }
28 $params = (array) elgg_extract('image_block_vars', $vars, []);
31 $params['class'] = $class;
32 $params['data-guid'] = $entity->guid;
Object chip Renders a simple image block with an icon and title.
Definition: chip.php:13
if(!isset($icon)) $params
Definition: chip.php:28
if($title=== '') $icon
Definition: chip.php:23
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:569
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:567
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:923
Definition: chip.php:29
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
Definition: html.php:24
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
if(!$entity instanceof ElggEntity) $title
Definition: chip.php:18