Elgg  Version master
time.php
Go to the documentation of this file.
1 <?php
15 $relationship = elgg_extract('relationship', $vars);
16 if (!$relationship instanceof ElggRelationship) {
17  return;
18 }
19 
20 $time = elgg_extract('time', $vars, $relationship->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 
32 echo elgg_view('object/elements/imprint/element', [
33  'icon_name' => elgg_extract('time_icon', $vars, 'history'),
34  'content' => $content,
35  'class' => [
36  'elgg-listing-time',
37  ],
38 ]);
$vars['class']
Definition: time.php:19
if(!$annotation instanceof ElggAnnotation) $time
Definition: time.php:20
if(empty($time)) $content
Definition: time.php:25
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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$relationship
Displays information about the time of the relationship.
Definition: time.php:15
$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