Elgg  Version 2.3
content.php
Go to the documentation of this file.
1 <?php
5 $widget = elgg_extract('entity', $vars);
6 
7 $num_display = sanitize_int($widget->num_display, false);
8 // set default value for display number
9 if (!$num_display) {
10  $num_display = 5;
11 }
12 
14 
15 echo elgg_list_entities([
16  'type' => 'user',
17  'subtype'=> null,
18  'wheres' => ["ue.banned = 'yes'"],
19  'joins' => ["JOIN {$db_prefix}users_entity ue on ue.guid = e.guid"],
20  'pagination' => false,
21  'limit' => $num_display,
22 ]);
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1375
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition: database.php:180
elgg_list_entities(array $options=array(), $getter='elgg_get_entities', $viewer='elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:393
if(elgg_in_context('default_widgets')) $widget
Definition: content.php:8
$vars['title']
Definition: content.php:19
if(! $num_display) $db_prefix
Definition: content.php:13
$num_display
Definition: content.php:7