PHP Class Backend\Modules\Blog\Engine\Api

Datei anzeigen Open project: forkcms/forkcms

Public Methods

Method Description
commentsDelete ( string $id ) Delete comment(s).
commentsGet ( string $status = null, integer $limit = 30, integer $offset ) : array Get the comments
commentsGetById ( integer $id ) : array Get a single comment
commentsUpdate ( integer $id, string $status = null, string $text = null, string $authorName = null, string $authorEmail = null, string $authorWebsite = null ) : null | boolean Update a comment
commentsUpdateStatus ( array $id, string $status ) Update the status for multiple comments at once.

Method Details

commentsDelete() public static method

Delete comment(s).
public static commentsDelete ( string $id )
$id string The id/ids of the comment(s) to update.

commentsGet() public static method

Get the comments
public static commentsGet ( string $status = null, integer $limit = 30, integer $offset ) : array
$status string The type of comments to get. Possible values are: published, moderation, spam.
$limit integer The maximum number of items to retrieve.
$offset integer The offset.
return array

commentsGetById() public static method

Get a single comment
public static commentsGetById ( integer $id ) : array
$id integer The id of the comment.
return array

commentsUpdate() public static method

Update a comment
public static commentsUpdate ( integer $id, string $status = null, string $text = null, string $authorName = null, string $authorEmail = null, string $authorWebsite = null ) : null | boolean
$id integer The id of the comment.
$status string The new status for the comment. Possible values are: published, moderation, spam.
$text string The new text for the comment.
$authorName string The new author for the comment.
$authorEmail string The new email for the comment.
$authorWebsite string The new website for the comment.
return null | boolean

commentsUpdateStatus() public static method

Update the status for multiple comments at once.
public static commentsUpdateStatus ( array $id, string $status )
$id array The id/ids of the comment(s) to update.
$status string The new status for the comment. Possible values are: published, moderation, spam.