Elgg  Version 6.1
time.php
Go to the documentation of this file.
1 <?php
15 $annotation = elgg_extract('annotation', $vars);
16 if (!$annotation instanceof ElggAnnotation) {
17  return;
18 }
19 
20 $time = elgg_extract('time', $vars, $annotation->time_created);
21 if (empty($time)) {
22  return;
23 }
24 
26 
27 $time_href = elgg_extract('time_href', $vars);
28 if (!empty($time_href)) {
30 }
31 
33  return;
34 }
35 
36 echo elgg_view('object/elements/imprint/element', [
37  'icon_name' => elgg_extract('time_icon', $vars, 'history'),
38  'content' => $content,
39  'class' => 'elgg-listing-time',
40 ]);
$vars['class']
Definition: time.php:19
$annotation
Displays information the time of the annotation.
Definition: time.php:15
if(!$annotation instanceof ElggAnnotation) $time
Definition: time.php:20
Entity Annotation.
if(empty($time)) $content
Definition: time.php:25
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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$time_href
Definition: time.php:27
elgg_view_friendly_time($time, $time_updated=null)
Displays a UNIX timestamp in a friendly way.
Definition: views.php:832
elgg_view_url(string $href, string $text=null, array $options=[])
Helper function for outputting urls.
Definition: views.php:1427