Elgg  Version 6.1
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  'full_view' => false,
17  'pagination' => false,
18  'limit' => $num_display,
19  'widget_more' => elgg_view_url($widget->getURL(), elgg_echo('more')),
20 ]);
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:256
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