PHP Class Newscoop\GimmeBundle\Controller\ArticlesController

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

Public Methods

Method Description
changeArticleStatus ( Request $request, $number, $language, $status ) Change Article status.
createArticleAction ( Request $request ) Create Article.
getArticleAction ( Request $request, $number, $language = null ) : Article Get article.
getArticlePlaylistsAction ( Request $request, $number, $language = null ) : array Gets the list of playlist the given article belongs to.
getArticlesAction ( Request $request ) : array Get Articles.
linkArticleAction ( Request $request, $number, $language = null ) : Article Link resource with Article entity.
lockUnlockArticle ( Request $request, $number, $language ) Lock or unlock article.
patchArticleAction ( Request $request, $number, $language ) Update Article.
relatedArticlesAction ( Request $request, $number, $language = null ) : array Get related articles.
searchArticlesAction ( Request $request ) : array Search for articles.
unlinkArticleAction ( Request $request, $number, $language = null ) : Article Unlink resource from Article.

Private Methods

Method Description
getArticle ( $number, $language, $user )
getNotConvertedLinks ( $request )
postAddUpdate ( $article )
processForm ( $request, $number, $language )

Method Details

changeArticleStatus() public method

Change Article status.
public changeArticleStatus ( Request $request, $number, $language, $status )
$request Symfony\Component\HttpFoundation\Request

createArticleAction() public method

Create Article.
public createArticleAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getArticleAction() public method

Get article.
public getArticleAction ( Request $request, $number, $language = null ) : Article
$request Symfony\Component\HttpFoundation\Request
return Article

getArticlePlaylistsAction() public method

.
public getArticlePlaylistsAction ( Request $request, $number, $language = null ) : array
$request Symfony\Component\HttpFoundation\Request
return array

getArticlesAction() public method

Get Articles.
public getArticlesAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
return array

linkArticleAction() public method

**article authors headers**: header name: "link" header value: "," **attachments headers**: header name: "link" header value: "" **images headers**: header name: "link" header value: "" **topics headers**: header name: "link" header value: "" **related articles headers**: header name: "link" header value: "" or with specific language header value: "" you can also specify position on list header value: ",<1; rel="article-position">"
public linkArticleAction ( Request $request, $number, $language = null ) : Article
$request Symfony\Component\HttpFoundation\Request
return Article

lockUnlockArticle() public method

Lock or unlock article.
public lockUnlockArticle ( Request $request, $number, $language )
$request Symfony\Component\HttpFoundation\Request

patchArticleAction() public method

Additional form aparameters: fields: array with article type fields and ther values. article[fields][lead] = 'new lead'
public patchArticleAction ( Request $request, $number, $language )
$request Symfony\Component\HttpFoundation\Request

relatedArticlesAction() public method

Get related articles.
public relatedArticlesAction ( Request $request, $number, $language = null ) : array
$request Symfony\Component\HttpFoundation\Request
return array

searchArticlesAction() public method

Parameter 'query' contains keywords seperated with ",". Example: test,article,keyword3
public searchArticlesAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
return array

unlinkArticleAction() public method

**article authors headers**: header name: "link" header value: "," **attachments headers**: header name: "link" header value: "" **images headers**: header name: "link" header value: "" **topics headers**: header name: "link" header value: "" **related articles headers**: header name: "link" header value: "" or with specific language header value: "" **slideshows headers**: header name: "link" header value: ""
public unlinkArticleAction ( Request $request, $number, $language = null ) : Article
$request Symfony\Component\HttpFoundation\Request
return Article