Elgg
Version 4.3
|
Go to the source code of this file.
Variables | |
$name = elgg_extract('name', $vars, 'members', false) | |
User Picker. More... | |
$guids = (array) elgg_extract('values', $vars, elgg_extract('value', $vars, [])) | |
$params = elgg_extract('options', $vars, []) | |
$friends_only = (bool) elgg_extract('only_friends', $vars, false) | |
$show_friends = (bool) elgg_extract('show_friends', $vars, !$friends_only) | |
if($friends_only) | $params ['include_banned'] = (bool) elgg_extract('include_banned', $vars, false) |
if(!empty($params)) | $handler = elgg_extract('handler', $vars, 'livesearch') |
$params ['view'] = 'json' | |
$wrapper_options | |
$picker | |
if($show_friends) elseif($friends_only) | else |
$items = '' | |
$friends_only = (bool) elgg_extract('only_friends', $vars, false) |
Definition at line 29 of file userpicker.php.
$guids = (array) elgg_extract('values', $vars, elgg_extract('value', $vars, [])) |
Definition at line 25 of file userpicker.php.
if (!empty($params)) $handler = elgg_extract('handler', $vars, 'livesearch') |
Definition at line 46 of file userpicker.php.
$items = '' |
Definition at line 78 of file userpicker.php.
$name = elgg_extract('name', $vars, 'members', false) |
User Picker.
Sends an array of user guids.
$vars['values'] Array of user guids for already selected users or null $vars['limit'] Limit number of users (default 0 = no limit) $vars['name'] Name of the returned data array (default "members") $vars['handler'] Name of page handler used to power search (default "livesearch") $vars['options'] Additional options to pass to the handler with the URL query If using custom options, make sure to impose a signed request gatekeeper in the resource view $vars['only_friends'] If enabled, will turn the input into a friends picker (default: false) $vars['show_friends'] Show the option to limit the search to friends (default: true) $vars['include_banned'] Include banned users in the search results (default: false) $vars['placeholder'] Optional placeholder text for the input
Defaults to lazy load user lists in alphabetical order. User needs to type two characters before seeing the user popup list.
As users are selected they move down to a "users" box. When this happens, a hidden input is created to return the GUID in the array with the form
Definition at line 23 of file userpicker.php.
$params = elgg_extract('options', $vars, []) |
Definition at line 27 of file userpicker.php.
if ($friends_only) $params['include_banned'] = (bool) elgg_extract('include_banned', $vars, false) |
Definition at line 35 of file userpicker.php.
$params['view'] = 'json' |
Definition at line 47 of file userpicker.php.
foreach ($guids as $guid) $picker |
Definition at line 56 of file userpicker.php.
$show_friends = (bool) elgg_extract('show_friends', $vars, !$friends_only) |
Definition at line 30 of file userpicker.php.
$wrapper_options |
Definition at line 49 of file userpicker.php.
Definition at line 74 of file userpicker.php.