Elgg  Version master
default.php
Go to the documentation of this file.
1 <?php
12 $entity = elgg_extract('entity', $vars);
13 if (!$entity instanceof \ElggEntity) {
14  return;
15 }
16 
17 // build image block content
18 $summary = '';
19 $summary .= elgg_view('trash/elements/metadata', $vars);
20 $summary .= elgg_view('trash/elements/title', $vars);
21 $summary .= elgg_view('trash/elements/subtitle', $vars);
22 $summary .= elgg_view('trash/elements/content', $vars);
23 
24 // image block params
25 $params = (array) elgg_extract('image_block_vars', $vars, []);
28 $params['class'] = $class;
29 $params['data-guid'] = $entity->guid;
30 
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:898
$class
Definition: default.php:29
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
if(!array_key_exists($size, $icon_sizes)) $vars['size']
Definition: default.php:25
$entity
Generic icon view.
Definition: default.php:13
$params
Definition: default.php:50
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) $summary
Definition: default.php:18