Elgg  Version 1.12
Variables
comments.php File Reference

Go to the source code of this file.

Variables

 $show_add_form = elgg_extract('show_add_form', $vars, true)
 List comments with optional add form. More...
 
 $full_view = elgg_extract('full_view', $vars, true)
 
 $limit = elgg_extract('limit', $vars, get_input('limit', 0))
 
if(! $limit) $attr
 
 $attr ['class'][] = 'elgg-comments'
 
 $content
 
 if ( $show_add_form)
 

Variable Documentation

◆ $attr [1/2]

if (! $limit) $attr
Initial value:
= [
'id' => elgg_extract('id', $vars, 'comments'),
'class' => (array) elgg_extract('class', $vars, []),
]
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:1271
if(file_exists($welcome)) $vars
Definition: upgrade.php:93
Examples
/root/Elgg/engine/lib/output.php.

Definition at line 22 of file comments.php.

◆ $attr [2/2]

$attr[ 'class'][] = 'elgg-comments'

Definition at line 26 of file comments.php.

◆ $content

Initial value:
'type' => 'object',
'subtype' => 'comment',
'container_guid' => $vars['entity']->guid,
'reverse_order_by' => true,
'full_view' => true,
'limit' => $limit,
'preload_owners' => true,
'distinct' => false,
'url_fragment' => $attr['id'],
))
elgg_list_entities(array $options=array(), $getter='elgg_get_entities', $viewer='elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:590
$limit
Definition: comments.php:17
if(! $limit) $attr
Definition: comments.php:22

Definition at line 31 of file comments.php.

◆ $full_view

$full_view = elgg_extract('full_view', $vars, true)

Definition at line 16 of file comments.php.

◆ $limit

$limit = elgg_extract('limit', $vars, get_input('limit', 0))

Definition at line 17 of file comments.php.

◆ $show_add_form

$show_add_form = elgg_extract('show_add_form', $vars, true)

List comments with optional add form.

@uses $vars['entity'] ElggEntity @uses $vars['show_add_form'] Display add form or not @uses $vars['id'] Optional id for the div @uses $vars['class'] Optional additional class for the div @uses $vars['limit'] Optional limit value (default is 25)

Definition at line 15 of file comments.php.

◆ if

if($show_add_form) (   $show_add_form)

Definition at line 43 of file comments.php.