PHP Class Newscoop\GimmeBundle\Controller\CommentsController

Inheritance: extends FOS\RestBundle\Controller\FOSRestController
Show file Open project: sourcefabric/newscoop

Public Methods

Method Description
createCommentAction ( Request $request, $articleNumber, $languageCode ) : Form Create new comment
deleteCommentAction ( Request $request, $commentId, $articleNumber = null, $languageCode = null ) : Form Delete comment
getCommentAction ( $id ) : Form Get comment
getCommentsAction ( ) : array Get all comments
getCommentsForArticleAction ( Request $request, $number, $language, $order ) Get comments for article
updateCommentAction ( Request $request, $commentId ) : Form Update comment

Private Methods

Method Description
processForm ( Request $request, integer $comment = null, integer $articleNumber = null, string $languageCode = null ) : Form Process comment form

Method Details

createCommentAction() public method

**Comment available statuses:** APPROVED - 0 PENDING - 1 HIDDEN - 2 DELETED - 3
public createCommentAction ( Request $request, $articleNumber, $languageCode ) : Form
$request Symfony\Component\HttpFoundation\Request
return Form

deleteCommentAction() public method

Delete comment
public deleteCommentAction ( Request $request, $commentId, $articleNumber = null, $languageCode = null ) : Form
$request Symfony\Component\HttpFoundation\Request
return Form

getCommentAction() public method

Get comment
public getCommentAction ( $id ) : Form
return Form

getCommentsAction() public method

Get all comments
public getCommentsAction ( ) : array
return array

getCommentsForArticleAction() public method

Get comments for article
public getCommentsForArticleAction ( Request $request, $number, $language, $order )
$request Symfony\Component\HttpFoundation\Request

updateCommentAction() public method

Update comment
public updateCommentAction ( Request $request, $commentId ) : Form
$request Symfony\Component\HttpFoundation\Request
return Form