Elgg  Version 1.9
Namespaces | Functions
comments.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Functions

 _elgg_comments_init ()
 Comments initialization function. More...
 
 _elgg_comments_page_handler ($page)
 Page handler for generic comments manipulation. More...
 
 _elgg_comment_setup_entity_menu ($hook, $type, $return, $params)
 Setup the menu shown with a comment. More...
 
 _elgg_comment_url_handler ($hook, $type, $return, $params)
 Format and return the URL for a comment. More...
 
 _elgg_comments_container_permissions_override ($hook, $type, $return, $params)
 Allow users to comment on entities not owned by them. More...
 
 _elgg_comments_permissions_override ($hook, $type, $return, $params)
 By default, only authors can edit their comments. More...
 

Function Documentation

_elgg_comment_setup_entity_menu (   $hook,
  $type,
  $return,
  $params 
)

Setup the menu shown with a comment.

Parameters
string$hook'register'
string$type'menu:entity'
ElggMenuItem[]$return Array of ElggMenuItem objects
array$paramsArray of view vars
Returns
array private

Definition at line 100 of file comments.php.

_elgg_comment_url_handler (   $hook,
  $type,
  $return,
  $params 
)

Format and return the URL for a comment.

This is the container's URL because comments don't have their own page.

Parameters
string$hook'entity:url'
string$type'object'
string$returnURL for entity
array$paramsArray with the elgg entity passed in as 'entity'
Returns
string private

Definition at line 133 of file comments.php.

_elgg_comments_container_permissions_override (   $hook,
  $type,
  $return,
  $params 
)

Allow users to comment on entities not owned by them.

Object being commented on is used as the container of the comment so permission check must be overridden if user isn't the owner of the object.

Parameters
string$hook'container_permissions_check'
string$type'object'
boolean$returnCan the current user write to this container?
array$paramsArray of parameters (container, user, subtype)
Returns
array private

Definition at line 167 of file comments.php.

_elgg_comments_init ( )

Comments initialization function.

Returns
void private

Definition at line 18 of file comments.php.

_elgg_comments_page_handler (   $page)

Page handler for generic comments manipulation.

Parameters
array$page
Returns
bool private

Definition at line 38 of file comments.php.

_elgg_comments_permissions_override (   $hook,
  $type,
  $return,
  $params 
)

By default, only authors can edit their comments.

Parameters
string$hook'permissions_check'
string$type'object'
boolean$returnCan the given user edit the given entity?
array$paramsArray of parameters (entity, user)
Returns
boolean Whether the given user is allowed to edit the given comment.

Definition at line 187 of file comments.php.