23 $entity = $event->getEntityParam();
28 if (!
$entity->hasCapability(
'commentable')) {
37 $return = $event->getValue();
40 $can_comment =
$entity->canComment();
50 'href' =>
$entity->getURL() .
'#comments',
53 $item = $event->getParam(
'item');
55 $options[
'href'] =
"#comments-add-{$entity->guid}-{$item->id}";
Models an event passed to event handlers.
if($who_can_change_language==='nobody') elseif($who_can_change_language==='admin_only' &&!elgg_is_admin_logged_in()) $options
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
if(!empty($item->annotation_id)||! $object instanceof ElggEntity|| $object instanceof ElggComment) if(! $object->hasCapability('commentable')) $comment_count