Elgg  Version master
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
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:898
if(!isset($icon)) $params
Definition: chip.php:28
if($title=== '') $icon
Definition: chip.php:23
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(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
Definition: views.php:542
Definition: chip.php:29
Definition: theme.php:5
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
if(!$entity instanceof ElggEntity) $title
Definition: chip.php:18