Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310
$defaults
Definition: location.php:13