PHP Class Newscoop\GimmeBundle\Controller\ArticlesController

Inheritance: extends FOS\RestBundle\Controller\FOSRestController
Afficher le fichier Open project: sourcefabric/newscoop

Méthodes publiques

Méthode 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

Méthode Description
getArticle ( $number, $language, $user )
getNotConvertedLinks ( $request )
postAddUpdate ( $article )
processForm ( $request, $number, $language )

Method Details

changeArticleStatus() public méthode

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

createArticleAction() public méthode

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

getArticleAction() public méthode

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

getArticlePlaylistsAction() public méthode

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

getArticlesAction() public méthode

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

linkArticleAction() public méthode

**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
Résultat Article

lockUnlockArticle() public méthode

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

patchArticleAction() public méthode

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 méthode

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

searchArticlesAction() public méthode

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

unlinkArticleAction() public méthode

**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
Résultat Article