Elgg
Version 2.3
views
default
page
components
column
time_created.php
Go to the documentation of this file.
1
<?php
11
$entity
=
$vars
[
'item'
];
12
/* @var ElggEntity $entity */
13
14
$format
=
elgg_extract
(
'format'
,
$vars
,
'M d, Y H:i'
);
15
16
if
(
$format
===
'friendly'
) {
17
echo
elgg_view
(
'output/friendlytime'
, [
18
'time'
=>
$entity
->time_created,
19
]);
20
return
;
21
}
22
23
echo date(
$format
,
$entity
->time_created);
elgg_extract
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:1375
elgg_view
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype='')
Return a parsed view.
Definition:
views.php:336
$vars
$vars['entity']
Definition:
plugin_settings.php:15
$format
$format
Definition:
time_created.php:14
$entity
$entity
Render the time created.
Definition:
time_created.php:11
Generated on Fri Aug 29 2025 00:00:47 for Elgg by
1.9.1