Elgg  Version master
content.php
Go to the documentation of this file.
1 <?php
6 $widget = elgg_extract('entity', $vars);
7 if (!$widget instanceof \ElggWidget) {
8  return;
9 }
10 
11 $num_display = (int) $widget->num_display ?: 4;
12 
13 echo elgg_list_entities([
14  'type' => 'user',
15  'subtype' => null,
16  'metadata_name_value_pairs' => [
17  'banned' => 'yes',
18  ],
19  'pagination' => false,
20  'limit' => $num_display,
21  'no_results' => true,
22  'widget_more' => elgg_view_url($widget->getURL(), elgg_echo('more')),
23 ]);
if(elgg_in_context('default_widgets')) $widget
Definition: content.php:8
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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
if(!$widget instanceof\ElggWidget) $num_display
Definition: content.php:11
elgg_list_entities(array $options=[], callable $getter=null, callable $viewer=null)
Returns a string of rendered entities.
Definition: entities.php:551
$vars
Definition: theme.php:5
elgg_view_url(string $href, string $text=null, array $options=[])
Helper function for outputting urls.
Definition: views.php:1427