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