Elgg  Version 1.11
location.php
Go to the documentation of this file.
1 <?php
10 $vars['class'] = (array) elgg_extract('class', $vars, []);
11 $vars['class'][] = 'elgg-input-location';
12 
13 $defaults = array(
14  'disabled' => false,
15 );
16 
17 if (isset($vars['entity'])) {
18  $defaults['value'] = $vars['entity']->location;
19  unset($vars['entity']);
20 }
21 
22 $vars = array_merge($defaults, $vars);
23 
24 echo elgg_view('input/tag', $vars);
$vars['class']
Location input field.
Definition: location.php:10
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$defaults
Definition: location.php:13