Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_comment_external Class Reference

External comment API functions. More...

Inheritance diagram for core_comment_external:

Static Public Member Functions

static add_comments ($comments)
 Add a comment or comments.
 
static add_comments_parameters ()
 Returns description of method parameters for the add_comments method.
 
static add_comments_returns ()
 Returns description of method result value for the add_comments method.
 
static delete_comments (array $comments)
 Deletes a comment or comments.
 
static delete_comments_parameters ()
 Returns description of method parameters for the delete_comments() method.
 
static delete_comments_returns ()
 Returns description of method result value for the delete_comments() method.
 
static get_comments ($contextlevel, $instanceid, $component, $itemid, $area='', $page=0, $sortdirection='DESC')
 Return a list of comments.
 
static get_comments_parameters ()
 Returns description of method parameters.
 
static get_comments_returns ()
 Returns description of method result value.
 

Static Protected Member Functions

static get_comment_structure ()
 Helper to get the structure of a single comment.
 

Detailed Description

External comment API functions.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.9

Member Function Documentation

◆ add_comments()

static core_comment_external::add_comments ( $comments)
static

Add a comment or comments.

Parameters
array$commentsthe array of comments to create.
Return values
arraythe array containing those comments created.
Exceptions
comment_exception
Since
Moodle 3.8

◆ add_comments_parameters()

static core_comment_external::add_comments_parameters ( )
static

Returns description of method parameters for the add_comments method.

Return values
external_function_parameters
Since
Moodle 3.8

◆ add_comments_returns()

static core_comment_external::add_comments_returns ( )
static

Returns description of method result value for the add_comments method.

Return values
core_external\external_description
Since
Moodle 3.8

◆ delete_comments()

static core_comment_external::delete_comments ( array $comments)
static

Deletes a comment or comments.

Parameters
array$commentsarray of comment ids to be deleted
Return values
array
Exceptions
comment_exception
Since
Moodle 3.8

◆ delete_comments_parameters()

static core_comment_external::delete_comments_parameters ( )
static

Returns description of method parameters for the delete_comments() method.

Return values
external_function_parameters
Since
Moodle 3.8

◆ delete_comments_returns()

static core_comment_external::delete_comments_returns ( )
static

Returns description of method result value for the delete_comments() method.

Return values
core_external\external_description
Since
Moodle 3.8

◆ get_comment_structure()

static core_comment_external::get_comment_structure ( )
staticprotected

Helper to get the structure of a single comment.

Return values
external_single_structurethe comment structure.

◆ get_comments()

static core_comment_external::get_comments ( $contextlevel,
$instanceid,
$component,
$itemid,
$area = '',
$page = 0,
$sortdirection = 'DESC' )
static

Return a list of comments.

Parameters
string$contextlevel('system, course, user', etc..)
int$instanceid
string$componentthe name of the component
int$itemidthe item id
string$areacomment area
int$pagepage number
string$sortdirectionsort direction
Return values
arrayof comments and warnings
Since
Moodle 2.9

◆ get_comments_parameters()

static core_comment_external::get_comments_parameters ( )
static

Returns description of method parameters.

Return values
external_function_parameters
Since
Moodle 2.9

◆ get_comments_returns()

static core_comment_external::get_comments_returns ( )
static

Returns description of method result value.

Return values
core_external\external_description
Since
Moodle 2.9

The documentation for this class was generated from the following file: