Elgg  Version 3.0
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 
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:205
$icon
Definition: summary.php:37
if(!$entity instanceof ElggEntity) $summary
Definition: summary.php:24
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_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:1177
elgg echo
Translates a string.
Definition: languages.js:43
$class
Definition: summary.php:41
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
$params
Definition: summary.php:40
$entity
Object summary Passing an &#39;icon&#39; with the variables will wrap the listing in an image block...
Definition: summary.php:18
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246