Elgg  Version 3.0
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 = get_entity($comment->container_guid)
 
 $commenter = get_user($comment->owner_guid)
 
if(!$entity||!$commenter) if($comment->canEdit()) if($full_view) else
 
 $friendlytime = elgg_view_friendly_time($comment->time_created)
 
 $commenter_link
 
 $entity_link
 
 $excerpt = elgg_get_excerpt($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($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168

Definition at line 66 of file comment.php.

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

Definition at line 12 of file comment.php.

$commenter = get_user($comment->owner_guid)

Definition at line 18 of file comment.php.

$commenter_link
Initial value:
= elgg_view('output/url', [
'href' => $commenter->getURL(),
'text' => $commenter->getDisplayName(),
])
$commenter
Definition: comment.php:18
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246

Definition at line 53 of file comment.php.

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

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($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
getDisplayName()
{}
Definition: ElggObject.php:38
if(!$comment instanceof\ElggComment) $entity
Definition: comment.php:17
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246
getURL()
Gets the URL for this entity.

Definition at line 58 of file comment.php.

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

Definition at line 63 of file comment.php.

$friendlytime = elgg_view_friendly_time($comment->time_created)

Definition at line 51 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

Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 10 of file comment.php.

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

Definition at line 64 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, $size= 'medium', $vars=[])
View the icon of an entity.
Definition: views.php:899

Definition at line 47 of file comment.php.