Elgg  Version 5.1
Variables
comment.php File Reference

Go to the source code of this file.

Variables

 $full_view = elgg_extract('full_view', $vars, true)
 Elgg comment view. More...
 
 $comment = elgg_extract('entity', $vars)
 
if(!$comment instanceof\ElggComment) $entity = $comment->getContainerEntity()
 
 $commenter = $comment->getOwnerEntity()
 
if(!$entity||!$commenter) if($comment->canEdit()) if($full_view) else
 
 $friendlytime = elgg_view_friendly_time($comment->time_created)
 
 $commenter_link = elgg_view_entity_url($commenter)
 
 $entity_link
 
 $excerpt = elgg_get_excerpt((string) $comment->description, 80)
 
 $posted = elgg_echo('generic_comment:on', [$commenter_link, $entity_link])
 
 $body
 

Variable Documentation

$body
Initial value:
'class' => 'elgg-subtext',
], "$posted ($friendlytime): $excerpt")
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145

Definition at line 91 of file comment.php.

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

Definition at line 12 of file comment.php.

$commenter = $comment->getOwnerEntity()

Definition at line 18 of file comment.php.

$commenter_link = elgg_view_entity_url($commenter)

Definition at line 81 of file comment.php.

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

Definition at line 17 of file comment.php.

$entity_link
Initial value:
= elgg_view('output/url', [
'href' => $entity->getURL(),
'text' => $entity->getDisplayName() ?: elgg_echo('untitled'),
])
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
getDisplayName()
{}
Definition: ElggObject.php:38
if(!$comment instanceof\ElggComment) $entity
Definition: comment.php:17
getURL()
Gets the URL for this entity.

Definition at line 83 of file comment.php.

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

Definition at line 88 of file comment.php.

$friendlytime = elgg_view_friendly_time($comment->time_created)

Definition at line 79 of file comment.php.

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

Elgg comment view.

$vars['entity'] ElggComment $vars['full_view'] Display full view or brief view $vars['show_excerpt'] Should the body text be an excerpt

Definition at line 10 of file comment.php.

$posted = elgg_echo('generic_comment:on', [$commenter_link, $entity_link])

Definition at line 89 of file comment.php.

if (!$entity||!$commenter) if ($comment->canEdit()) if ($full_view) else
Initial value:
{
$commenter_icon = elgg_view_entity_icon($commenter, 'small')
$commenter
Definition: comment.php:18
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
Definition: views.php:563

Definition at line 75 of file comment.php.