Elgg  Version 3.0
Namespaces | Variables
autocomplete.php File Reference

Go to the source code of this file.

Namespaces

 Elgg
 Configuration exception.
 

Variables

 $vars ['class'] = elgg_extract_class($vars, 'elgg-input-autocomplete')
 
 $defaults
 
 $params = elgg_extract('options', $vars, [])
 
if(!empty($params)) $match_on = elgg_extract('match_on', $vars)
 
if(empty($match_on)||is_array($match_on)) if($match_on== 'all') if($match_on== 'friends') $params ['match_on'] = $match_on
 
if(isset($vars['match_owner'])) if(isset($vars['match_membership'])) if(isset($vars['match_target'])) $params ['view'] = 'json'
 
 $handler = elgg_extract('handler', $vars, "livesearch/$match_on")
 
 $source = elgg_normalize_url(elgg_http_add_url_query_elements($handler, $params))
 
 $vars ['type'] = 'text'
 
 $vars ['data-source'] = $source
 

Variable Documentation

$defaults
Initial value:
= [
'value' => ''
Examples:
/root/Elgg/engine/classes/Elgg/FormsService.php, and /root/Elgg/engine/lib/views.php.

Definition at line 29 of file autocomplete.php.

$handler = elgg_extract('handler', $vars, "livesearch/$match_on")

Definition at line 88 of file autocomplete.php.

if (!empty($params)) $match_on = elgg_extract('match_on', $vars)

Definition at line 47 of file autocomplete.php.

$params = elgg_extract('options', $vars, [])

Definition at line 36 of file autocomplete.php.

if (empty($match_on)||is_array($match_on)) if ($match_on== 'all') if ($match_on== 'friends') $params['match_on'] = $match_on

Definition at line 63 of file autocomplete.php.

if (isset($vars['match_owner'])) if (isset($vars['match_membership'])) if (isset($vars['match_target'])) $params['view'] = 'json'

Definition at line 87 of file autocomplete.php.

Definition at line 89 of file autocomplete.php.

$vars = elgg_extract_class($vars, 'elgg-input-autocomplete')

Definition at line 27 of file autocomplete.php.

$vars['type'] = 'text'

Definition at line 91 of file autocomplete.php.

$vars['data-source'] = $source

Definition at line 92 of file autocomplete.php.