Elgg  Version master
Variables
comments_block.php File Reference

Go to the source code of this file.

Variables

 $options
 Display the latest related comments. More...
 
 $owner_guid = elgg_extract('owner_guid', $vars)
 
 $container_guid = elgg_extract('container_guid', $vars)
 
 $subtypes = elgg_extract('subtypes', $vars)
 
if($owner_guid) if($container_guid) if($subtypes) $comments = elgg_get_entities($options)
 
if(empty($comments)) $body
 

Variable Documentation

◆ $body

if (empty( $comments)) $body
Initial value:
'pagination' => false,
'full_view' => false,
'list_class' => 'elgg-latest-comments',
'item_view' => 'object/comment/sidebar',
])
if($owner_guid) if($container_guid) if($subtypes) $comments
elgg_view_entity_list(array $entities, array $vars=[])
Returns a rendered list of entities with pagination.
Definition: views.php:636

Definition at line 59 of file comments_block.php.

◆ $comments

if ( $owner_guid) if ( $container_guid) if ( $subtypes) $comments = elgg_get_entities($options)

Definition at line 54 of file comments_block.php.

◆ $container_guid

Definition at line 24 of file comments_block.php.

◆ $options

$options
Initial value:
= [
'type' => 'object',
'subtype' => 'comment',
'limit' => elgg_extract('limit', $vars, 4),
'wheres' => [],
'preload_owners' => true,
'distinct' => false,
'metadata_name_value_pairs' => ['level' => 1],
]
$vars
Definition: theme.php:5
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

Display the latest related comments.

Generally used in a sidebar.

@uses $vars['subtypes'] Object subtype string or array of subtypes @uses $vars['owner_guid'] The owner of the content being commented on @uses $vars['container_guid'] The container of the content being commented on @uses $vars['limit'] The number of comments to display

Definition at line 13 of file comments_block.php.

◆ $owner_guid

$owner_guid = elgg_extract('owner_guid', $vars)

Definition at line 23 of file comments_block.php.

◆ $subtypes

$subtypes = elgg_extract('subtypes', $vars)

Definition at line 25 of file comments_block.php.