Elgg  Version master
Variables
autocomplete.php File Reference

Go to the source code of this file.

Variables

 $vars ['class'] = elgg_extract_class($vars, 'elgg-input-autocomplete')
 Displays an autocomplete text input. More...
 
 $params = elgg_extract('options', $vars, [])
 
if(!empty($params)) $match_on = elgg_extract('match_on', $vars)
 
if(empty($match_on)||!is_string($match_on)) 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

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

Definition at line 71 of file autocomplete.php.

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

Definition at line 35 of file autocomplete.php.

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

Definition at line 24 of file autocomplete.php.

if (empty($match_on)||!is_string($match_on)) if ($match_on== 'friends') $params['match_on'] = $match_on

Definition at line 45 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 70 of file autocomplete.php.

Definition at line 72 of file autocomplete.php.

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

Displays an autocomplete text input.

$vars['handler'] Data source URL, defaults to /livesearch handler $vars['options'] Options to be passed to the handler with the URL query If using custom options, make sure to impose a signed request gatekeeper in the resource view $vars['value'] Current value for the text input $vars['match_on'] users|groups|friends $vars['match_owner'] Restrict search results to owned entities Applies to group search. Owner will default to logged in user, unless match_target is set $vars['match_membership'] Restrict search results to entities that user is a member of Applies to group search. Unless match_target is set, will default to currently logge din user $vars['match_target'] Restrict search results to a specific target Applies to friends search Applies to group search with match_owner Applies to group search with match_membership Note that current user must be able to edit the target user for the results to show $vars['class'] Additional CSS class

Definition at line 22 of file autocomplete.php.

$vars['type'] = 'text'

Definition at line 74 of file autocomplete.php.

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

Definition at line 75 of file autocomplete.php.