PHP Class Newscoop\GimmeBundle\Controller\AuthorsController

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

Public Methods

Method Description
getArticleAuthorAction ( $number, $language, $id ) Get single article author
getArticleAuthorsAction ( $number, $language ) Get article authors
getAuthorAction ( $id ) Get author
getAuthorByIdAction ( $id ) Get author
getAuthorTypeAction ( $id ) Get author type
getAuthorsTypesAction ( ) Get authors types
searchAuthorsAction ( Request $request ) Search for authors
setArticleAuthorsOrderAction ( Request $request, $number, $language ) Set article authors order
updateArticleAuthorAction ( Request $request, $number, $language, $authorId ) Update single article author

Method Details

getArticleAuthorAction() public method

Get single article author
public getArticleAuthorAction ( $number, $language, $id )

getArticleAuthorsAction() public method

Get article authors
public getArticleAuthorsAction ( $number, $language )

getAuthorAction() public method

This route will be removed in 4.4
Deprecation:
public getAuthorAction ( $id )

getAuthorByIdAction() public method

Get author
public getAuthorByIdAction ( $id )

getAuthorTypeAction() public method

Get single author type
public getAuthorTypeAction ( $id )

getAuthorsTypesAction() public method

Get list of authors types

searchAuthorsAction() public method

Get list of authors for search query
public searchAuthorsAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

setArticleAuthorsOrderAction() public method

New order must be send with form in this format order={authorId}-{authorType},{authorId}-{authorType},{authorId}-{authorType},{authorId}-{authorType} example: order=7-1,8-1,5-2,4-2 All article author-author type pair must be send.
public setArticleAuthorsOrderAction ( Request $request, $number, $language )
$request Symfony\Component\HttpFoundation\Request

updateArticleAuthorAction() public method

To update currently assigned article author you need provide his old and new article type, it can be done with special link header value: , example: **To update artile author with number 7 and type 1 to type 2 you need to send**: [POST] /articles/{number}/{language}/authors/7 **With header link and his value:** ,
public updateArticleAuthorAction ( Request $request, $number, $language, $authorId )
$request Symfony\Component\HttpFoundation\Request