Elgg  Version 6.1
metadata.php
Go to the documentation of this file.
1 <?php
10 $metadata = elgg_extract('metadata', $vars);
11 if (!isset($metadata)) {
12  $metadata = '';
13 
14  $entity = elgg_extract('entity', $vars);
15 
16  $show_entity_menu = elgg_extract('show_trash_menu', $vars, true);
17  if ($show_entity_menu) {
18  $metadata .= elgg_view_menu('entity:trash', [
19  'entity' => $entity,
20  'prepare_dropdown' => true,
21  ]);
22  }
23 }
24 
25 if (!$metadata) {
26  return;
27 }
28 
29 echo elgg_format_element('div', [
30  'class' => 'elgg-listing-summary-metadata'
31 ], $metadata);
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
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:441
$entity
Definition: reset.php:8
$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