Elgg  Version 2.3
content.php
Go to the documentation of this file.
1 <?php
6 $widget = elgg_extract('entity', $vars);
7 
8 $num_display = sanitize_int($widget->num_display, false);
9 // set default value for display number
10 if (!$num_display) {
11  $num_display = 8;
12 }
13 
15  'limit' => $num_display,
16  'pagination' => false,
17  'no_results' => elgg_echo('river:none'),
18 ];
19 
20 if (elgg_in_context('dashboard')) {
21  if ($widget->content_type == 'friends') {
22  $options['relationship_guid'] = $widget->getOwnerGUID();
23  $options['relationship'] = 'friend';
24  }
25 } else {
26  $options['subject_guid'] = $widget->getOwnerGUID();
27 }
28 
elgg_list_river(array $options=array())
List river items.
Definition: river.php:441
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
if(elgg_in_context('default_widgets')) $widget
Definition: content.php:8
elgg_in_context($context)
Check if this context exists anywhere in the stack.
Definition: pageowner.php:241
elgg echo
Translates a string.
Definition: languages.js:48
$num_display
Definition: content.php:7
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
$vars['title']
Definition: content.php:19
if(!$num_display) $options
Definition: content.php:14
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition: database.php:180