Elgg  Version 6.2
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 instanceof \ElggEntity||! $commenter instanceof \ElggEntity) if($comment->canEdit()) $params
 
if($comment->isCreatedByContentOwner()) if($full_view) else
 

Variable Documentation

◆ $comment

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

Definition at line 11 of file comment.php.

◆ $commenter

$commenter = $comment->getOwnerEntity()

Definition at line 17 of file comment.php.

◆ $entity

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

Definition at line 16 of file comment.php.

◆ $full_view

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

Elgg comment view.

@uses $vars['entity'] ElggComment @uses $vars['full_view'] Display full view or brief view

Definition at line 9 of file comment.php.

◆ $params

$params
Initial value:
= [
'icon_entity' => $commenter,
'time_href' => $comment->getURL(),
'access' => false,
'title' => false,
'tag_name' => 'article',
'imprint' => elgg_extract('imprint', $vars, []),
]
$vars
Definition: theme.php:5
$commenter
Definition: comment.php:17
$comment
Definition: comment.php:11
elgg_extract_class(array $array, array|string $existing=[], string $extract_key='class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:279
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256

Definition at line 26 of file comment.php.

◆ else

if ( $comment->isCreatedByContentOwner()) if ( $full_view) else
Initial value:
{
$params['content'] = elgg_get_excerpt((string) $comment->description)
if(! $entity instanceof \ElggEntity||! $commenter instanceof \ElggEntity) if($comment->canEdit()) $params
Definition: comment.php:26
elgg_get_excerpt(string $text, int $num_chars=250)
Returns an excerpt.
Definition: output.php:83

Definition at line 69 of file comment.php.