Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
page
components
column
time_updated.php
Go to the documentation of this file.
1
<?php
11
$entity
=
elgg_extract
(
'item'
,
$vars
);
12
if
(!
$entity
instanceof
ElggEntity
) {
13
return
;
14
}
15
16
$format
=
elgg_extract
(
'format'
,
$vars
, DATE_RFC2822);
17
18
if
(
$format
===
'friendly'
) {
19
echo
elgg_view
(
'output/friendlytime'
, [
20
'time'
=>
$entity
->time_updated,
21
]);
22
return
;
23
}
24
25
echo
elgg_view
(
'output/date'
, [
26
'value'
=>
$entity
->time_updated,
27
'format'
=>
$format
,
28
]);
$format
if(!$entity instanceof ElggEntity) $format
Definition:
time_updated.php:16
elgg_extract
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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition:
views.php:156
$entity
$entity
Render the time updated.
Definition:
time_updated.php:11
$vars
$vars
Definition:
theme.php:5
ElggEntity
Definition:
ElggEntity.php:52
Generated on Sat Dec 21 2024 00:02:54 for Elgg by
1.8.11