Elgg  Version master
all.php
Go to the documentation of this file.
1 <?php
10  'no_results' => true,
11  'distinct' => false,
12 ];
13 
14 $options = (array) elgg_extract('options', $vars, []);
15 $options = array_merge($defaults, $options);
16 
17 if (empty($options['type']) && empty($options['subtype'])) {
18  throw new \Elgg\Exceptions\InvalidArgumentException("Missing 'type' and 'subtype' in the listing options");
19 }
20 
21 $getter = elgg_extract('getter', $vars);
22 
$options
Definition: all.php:14
$defaults
Generic view for entity listing.
Definition: all.php:9
if(empty($options['type']) &&empty($options['subtype'])) $getter
Definition: all.php:21
$vars['options']
Definition: all.php:32
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:246
elgg_list_entities(array $options=[], ?callable $getter=null, ?callable $viewer=null)
Returns a string of rendered entities.
Definition: entities.php:551