Elgg  Version master
summary.php
Go to the documentation of this file.
1 <?php
18 $entity = elgg_extract('entity', $vars);
19 if (!$entity instanceof ElggEntity) {
20  return;
21 }
22 
23 // build image block content
24 $summary = '';
25 $summary .= elgg_view('object/elements/summary/metadata', $vars);
26 $summary .= elgg_view('object/elements/summary/title', $vars);
27 $summary .= elgg_view('object/elements/summary/subtitle', $vars);
28 $summary .= elgg_view('object/elements/summary/tags', $vars);
29 
30 if (elgg_view_exists('object/summary/extend')) {
31  $summary .= elgg_view('object/summary/extend', $vars);
32 }
33 
34 $summary .= elgg_view('object/elements/summary/content', $vars);
35 
36 // image block image
37 $icon = elgg_view('object/elements/summary/icon', $vars);
38 
39 // image block params
40 $params = (array) elgg_extract('image_block_vars', $vars, []);
43 $params['class'] = $class;
44 $params['data-guid'] = $entity->guid;
45 
$icon
Definition: summary.php:40
$params
Definition: summary.php:43
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:919
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:276
$class
Definition: summary.php:44
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:177
$vars
Definition: theme.php:5
if(!$owner instanceof ElggEntity) $summary
Definition: summary.php:33
elgg_view_exists(string $view, string $viewtype= '', bool $recurse=true)
Returns whether the specified view exists.
Definition: views.php:152
if(!$annotation instanceof ElggAnnotation) $entity
Definition: summary.php:22