Elgg
Version 6.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
user
elements
imprint
location.php
Go to the documentation of this file.
1
<?php
14
$entity
=
elgg_extract
(
'entity'
,
$vars
);
15
if
(!
$entity
instanceof
ElggUser
) {
16
return
;
17
}
18
19
$location
=
elgg_extract
(
'location'
,
$vars
);
20
if
(!isset(
$location
)) {
21
$location
=
$entity
->getProfileData(
'location'
);
22
}
23
24
if
(
elgg_is_empty
(
$location
)) {
25
return
;
26
}
27
28
echo
elgg_view
(
'object/elements/imprint/element'
, [
29
'icon_name'
=>
elgg_extract
(
'location_icon'
,
$vars
,
'map-marker'
),
30
'content'
=>
$location
,
31
'class'
=>
'elgg-listing-location'
,
32
]);
$entity
$entity
Displays information about the location of the user.
Definition:
location.php:14
$vars
$vars['class']
Location input field.
Definition:
location.php:10
$location
if(!$entity instanceof ElggUser) $location
Definition:
location.php:19
elgg_is_empty
elgg_is_empty($value)
Check if a value isn't empty, but allow 0 and '0'.
Definition:
input.php:176
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
ElggUser
Definition:
ElggUser.php:28
Generated on Mon Oct 7 2024 00:00:27 for Elgg by
1.8.11