Elgg  Version 6.0
summary.php
Go to the documentation of this file.
1 <?php
17 $relationship = elgg_extract('relationship', $vars);
18 if (!$relationship instanceof ElggRelationship) {
19  return;
20 }
21 
24 if (empty($entity_one) || empty($entity_two)) {
25  return;
26 }
27 
28 // build image block content
29 $summary = '';
30 $summary .= elgg_view('relationship/elements/summary/metadata', $vars);
31 $summary .= elgg_view('relationship/elements/summary/title', $vars);
32 $summary .= elgg_view('relationship/elements/summary/subtitle', $vars);
33 $summary .= elgg_view('relationship/elements/summary/content', $vars);
34 
35 // image block image
36 $icon = elgg_view('relationship/elements/summary/icon', $vars);
37 
38 // image block params
39 $params = (array) elgg_extract('image_block_vars', $vars, []);
42 $params['class'] = $class;
43 $params['data-id'] = $relationship->id;
44 
$icon
Definition: summary.php:40
$params
Definition: summary.php:43
$relationship
Relationship summary Passing an &#39;icon&#39; with the variables will wrap the listing in an image block...
Definition: summary.php:17
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:898
if(!$relationship instanceof ElggRelationship) $entity_one
Definition: summary.php:22
$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
$entity_two
Definition: summary.php:23
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:70
$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