Elgg  Version 4.3
summary.php
Go to the documentation of this file.
1 <?php
17 $annotation = elgg_extract('annotation', $vars);
18 if (!$annotation instanceof ElggAnnotation) {
19  return;
20 }
21 
22 $entity = $annotation->getEntity();
23 if (!$entity instanceof ElggEntity) {
24  return;
25 }
26 
27 $owner= $annotation->getOwnerEntity();
28 if (!$owner instanceof ElggEntity) {
29  return;
30 }
31 
32 // build image block content
33 $summary = '';
34 $summary .= elgg_view('annotation/elements/summary/metadata', $vars);
35 $summary .= elgg_view('annotation/elements/summary/title', $vars);
36 $summary .= elgg_view('annotation/elements/summary/subtitle', $vars);
37 $summary .= elgg_view('annotation/elements/summary/content', $vars);
38 
39 // image block image
40 $icon = elgg_view('annotation/elements/summary/icon', $vars);
41 
42 // image block params
43 $params = (array) elgg_extract('image_block_vars', $vars, []);
46 $params['class'] = $class;
47 $params['data-id'] = $annotation->id;
48 
if(!$entity instanceof ElggEntity) $owner
Definition: summary.php:27
$icon
Definition: summary.php:40
$params
Definition: summary.php:43
$annotation
Annotation summary Passing an &#39;icon&#39; with the variables will wrap the listing in an image block...
Definition: summary.php:17
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:569
$class
Definition: summary.php:44
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:923
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:547
if(!$owner instanceof ElggEntity) $summary
Definition: summary.php:33
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
if(!$annotation instanceof ElggAnnotation) $entity
Definition: summary.php:22