Elgg  Version master
location.php
Go to the documentation of this file.
1 <?php
10 $vars['class'] = elgg_extract_class($vars, 'elgg-input-location');
11 
12 $defaults = [];
13 
14 if (isset($vars['entity'])) {
15  $defaults['value'] = elgg_extract('entity', $vars)->location;
16  unset($vars['entity']);
17 }
18 
19 $vars = array_merge($defaults, $vars);
20 
21 echo elgg_view('input/tag', $vars);
$vars['class']
Location input field.
Definition: location.php:10
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(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$defaults
Definition: location.php:12
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:277