Elgg  Version master
objectpicker.php
Go to the documentation of this file.
1 <?php
12 if (!isset($vars['name'])) {
13  $vars['name'] = 'guids';
14 }
15 
16 $vars['match_on'] = elgg_extract('match_on', $vars, 'objects');
17 $vars['class'] = elgg_extract_class($vars, ['elgg-object-picker']);
18 
19 $options = (array) elgg_extract('options', $vars, []);
20 $options['subtype'] = elgg_extract('subtype', $vars);
21 
22 $vars['options'] = $options;
23 
24 echo elgg_view('input/entitypicker', $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:276
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
$options
if(!isset($vars['name'])) $vars['match_on']
Elgg object picker.