Elgg  Version master
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 = elgg_format_element('span', ['class' => 'elgg-subtext'], "{$posted} ({$friendlytime}): {$excerpt}")

Definition at line 23 of file sidebar.php.

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

Show a comment in the sidebar.

$vars['entity'] the comment to show

Definition at line 8 of file sidebar.php.

$commenter = $comment->getOwnerEntity()

Definition at line 14 of file sidebar.php.

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

Definition at line 13 of file sidebar.php.

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

Definition at line 20 of file sidebar.php.

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

Definition at line 19 of file sidebar.php.

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

Definition at line 21 of file sidebar.php.