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 = elgg_view('object/elements/summary/metadata', $vars);
25 $summary .= elgg_view('object/elements/summary/title', $vars);
26 $summary .= elgg_view('object/elements/summary/subtitle', $vars);
27 $summary .= elgg_view('object/elements/summary/tags', $vars);
28 $summary .= elgg_view('object/elements/summary/content', $vars);
29 
30 // image block image
31 $icon = elgg_view('object/elements/summary/icon', $vars);
32 
33 // image block params
34 $params = (array) elgg_extract('image_block_vars', $vars, []);
37 $params['class'] = $class;
38 $params['data-guid'] = $entity->guid;
39 $params['tag_name'] = elgg_extract('tag_name', $params, 'article');
40 
$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:898
$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:156
$vars
Definition: theme.php:5
if(!$owner instanceof ElggEntity) $summary
Definition: summary.php:33
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(!$annotation instanceof ElggAnnotation) $entity
Definition: summary.php:22