Elgg  Version 3.0
chip.php
Go to the documentation of this file.
1 <?php
13 $entity = elgg_extract('entity', $vars);
14 if (!$entity instanceof ElggEntity) {
15  return;
16 }
17 
18 $title = elgg_extract('title', $vars, '');
19 if ($title === '') {
20  $title = elgg_view('object/elements/summary/title', $vars);
21 }
22 
24 if (!isset($icon)) {
26 }
27 
28 $params = (array) elgg_extract('image_block_vars', $vars, []);
31 $params['class'] = $class;
32 $params['data-guid'] = $entity->guid;
33 
$entity
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:1153
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:899
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:1177
$class
Definition: chip.php:29
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
$vars['type']
Definition: save.php:11
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246
if(!$entity instanceof ElggEntity) $title
Definition: chip.php:18