Elgg  Version 6.2
Variables
sidebar.php File Reference

Go to the source code of this file.

Variables

 $comment = elgg_extract('entity', $vars)
 Show a comment in the sidebar. More...
 
if(! $comment instanceof \ElggComment$entity = $comment->getContainerEntity()
 
 $commenter = $comment->getOwnerEntity()
 
if(! $entity instanceof \ElggEntity||! $commenter instanceof \ElggEntity$friendlytime = elgg_view_friendly_time($comment->time_created)
 
 $excerpt = elgg_get_excerpt((string) $comment->description, 80)
 
 $posted = elgg_echo('generic_comment:on', [elgg_view_entity_url($commenter), elgg_view_entity_url($entity)])
 
 $body = elgg_format_element('span', ['class' => 'elgg-subtext'], "{$posted} ({$friendlytime}): {$excerpt}")
 

Variable Documentation

◆ $body

$body = elgg_format_element('span', ['class' => 'elgg-subtext'], "{$posted} ({$friendlytime}): {$excerpt}")

Definition at line 23 of file sidebar.php.

◆ $comment

$comment = elgg_extract('entity', $vars)

Show a comment in the sidebar.

@uses $vars['entity'] the comment to show

Definition at line 8 of file sidebar.php.

◆ $commenter

$commenter = $comment->getOwnerEntity()

Definition at line 14 of file sidebar.php.

◆ $entity

if (! $comment instanceof \ElggComment) $entity = $comment->getContainerEntity()

Definition at line 13 of file sidebar.php.

◆ $excerpt

$excerpt = elgg_get_excerpt((string) $comment->description, 80)

Definition at line 20 of file sidebar.php.

◆ $friendlytime

if (! $entity instanceof \ElggEntity||! $commenter instanceof \ElggEntity) $friendlytime = elgg_view_friendly_time($comment->time_created)

Definition at line 19 of file sidebar.php.

◆ $posted

$posted = elgg_echo('generic_comment:on', [elgg_view_entity_url($commenter), elgg_view_entity_url($entity)])

Definition at line 21 of file sidebar.php.