Elgg  Version 3.0
objectpicker.php
Go to the documentation of this file.
1 <?php
12 if (!isset($vars['name'])) {
13  $vars['name'] = 'guids';
14 }
15 
16 $vars['show_friends'] = false;
17 $vars['match_on'] = elgg_extract('match_on', $vars, 'objects');
18 $vars['class'] = elgg_extract_class($vars, ['elgg-object-picker']);
19 
20 $options = (array) elgg_extract('options', $vars, []);
21 $options['subtype'] = elgg_extract('subtype', $vars);
22 
23 $vars['options'] = $options;
24 
25 // @todo don't abuse userpicker, make it into generic entity picker
26 echo elgg_view('input/userpicker', $vars);
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:1153
$options
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
if(!isset($vars['name'])) $vars['show_friends']
Elgg object picker.
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246