Summary
- File
- Package hierarchy Content\Comments
- Class hierarchy \CommentsService
This class allows you to use a comments system
This class allows you to use a comments system
__static()
None found |
display(\CommentsTopic $topic) : \Template
This function display the comments
\CommentsTopic | $topic |
is a template object
None found |
get_number_and_lang_comments(string $module_id, integer $id_in_module, string $topic_identifier = \CommentsTopic::DEFAULT_TOPIC_IDENTIFIER) : string
Returns number comments and lang (example : Comments (comments_number)
string | $module_id | the module identifier |
integer | $id_in_module | id in module used in comments system |
string | $topic_identifier | topic identifier (use if you have several comments system) |
number comments (example : Comments (comments_number)
None found |
get_lang_comments(string $module_id, integer $id_in_module = '', string $topic_identifier = \CommentsTopic::DEFAULT_TOPIC_IDENTIFIER) : string
Returns lang (example : "Comments" for several comments, "comment" for one comment and "No comment" if no comment
string | $module_id | the module identifier |
integer | $id_in_module | id in module used in comments system |
string | $topic_identifier | topic identifier (use if you have several comments system) |
None found |
delete_comments_module(string $module_id)
Delete all comments module
string | $module_id | the module identifier |
None found |
delete_comments_topic_module(string $module_id, integer $id_in_module)
Delete comments topic according to module identifier and id in module
string | $module_id | the module identifier |
integer | $id_in_module | id in module used in comments system |
None found |
get_comments_number(string $module_id, integer $id_in_module = '', string $topic_identifier = \CommentsTopic::DEFAULT_TOPIC_IDENTIFIER) : string
Returns number comments
string | $module_id | the module identifier |
integer | $id_in_module | id in module used in comments system |
string | $topic_identifier | topic identifier (use if you have several comments system) |
number comments
None found |
display_comments(string $module_id, integer $id_in_module, string $topic_identifier, string $comments_number_to_display, array $authorizations, boolean $display_from_comments_number = false) : object
Do not use, this is used for ajax display comments
string | $module_id | the module identifier |
integer | $id_in_module | id in module used in comments system |
string | $topic_identifier | topic identifier (use if you have several comments system) |
string | $comments_number_to_display | number of comments to display the first time |
array | $authorizations | comments topic authorizations |
boolean | $display_from_comments_number | true if need to display from the number of comments to display (used in ajax to show all comments of an element) |
View is a view
None found |
verify_authorized_edit_or_delete_comment( $authorizations, $comment_id)
$authorizations | ||
$comment_id |
None found |
is_authorized_edit_or_delete_comment( $authorizations, $comment_id)
$authorizations | ||
$comment_id |
None found |
$user :
None found |
$lang :
None found |
$common_lang :
None found |
$comments_lang :
None found |
$comments_cache :
None found |
$template :
None found |
$display_delete_button :
None found |