Elgg  Version master
time.php
Go to the documentation of this file.
1 <?php
15 $entity = elgg_extract('entity', $vars);
16 if (!$entity instanceof \ElggEntity) {
17  return;
18 }
19 
20 $time = elgg_extract('time', $vars, $entity->time_deleted);
21 if (!$time) {
22  return;
23 }
24 
26 $time_href = elgg_extract('time_href', $vars);
27 if (!empty($time_href)) {
29 }
30 
31 echo elgg_view('trash/elements/imprint/element', [
32  'icon_name' => elgg_extract('time_icon', $vars, 'trash-alt'),
33  'content' => $content,
34  'class' => 'elgg-listing-time',
35 ]);
$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
$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
$entity
Displays information the time of the post.
Definition: time.php:15