Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
page
components
column
prev_last_login.php
Go to the documentation of this file.
1
<?php
11
$entity
=
elgg_extract
(
'item'
,
$vars
);
12
if
(!
$entity
instanceof \
ElggUser
) {
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
->prev_last_login,
21
]);
22
return
;
23
}
24
25
echo
elgg_view
(
'output/date'
, [
26
'value'
=>
$entity
->prev_last_login,
27
'format'
=>
$format
,
28
]);
$entity
$entity
Render the prev last login timestamp.
Definition:
prev_last_login.php:11
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
$vars
$vars
Definition:
theme.php:5
$format
if(!$entity instanceof\ElggUser) $format
Definition:
prev_last_login.php:16
ElggUser
Definition:
ElggUser.php:28
Generated on Wed Dec 4 2024 00:02:58 for Elgg by
1.8.11