Elgg  Version 6.1
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($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$options
if(!isset($vars['name'])) $vars['match_on']
Elgg object picker.
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:279