Elgg  Version 6.1
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 
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
Displays information about the location of the user.
Definition: location.php:14
$vars['class']
Location input field.
Definition: location.php:10
if(!$entity instanceof ElggUser) $location
Definition: location.php:19
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:176
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:256
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156