Elgg  Version 6.1
metadata.php
Go to the documentation of this file.
1 <?php
9 $metadata = elgg_extract('metadata', $vars, '');
10 if ($metadata === false) {
11  return;
12 }
13 
14 $relationship = elgg_extract('relationship', $vars);
15 if ($metadata === '' && $relationship instanceof ElggRelationship) {
16  $metadata = elgg_view_menu('relationship', [
17  'relationship' => $relationship,
18  'class' => 'elgg-menu-hz',
19  'prepare_dropdown' => true,
20  ]);
21 }
22 
24  return;
25 }
26 
27 echo elgg_format_element('div', ['class' => [
28  'elgg-listing-summary-metadata',
29 ]], $metadata);
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:176
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:256
if($metadata===false) $relationship
Definition: metadata.php:14
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:441
$vars
Definition: theme.php:5
$metadata
Output annotation metadata.
Definition: metadata.php:9
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145