PHP Класс Newscoop\GimmeBundle\Controller\ArticlesController

Наследование: extends FOS\RestBundle\Controller\FOSRestController
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
getArticle ( $number, $language, $user )
getNotConvertedLinks ( $request )
postAddUpdate ( $article )
processForm ( $request, $number, $language )

Описание методов

changeArticleStatus() публичный Метод

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

createArticleAction() публичный Метод

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

getArticleAction() публичный Метод

Get article.
public getArticleAction ( Request $request, $number, $language = null ) : Article
$request Symfony\Component\HttpFoundation\Request
Результат Article

getArticlePlaylistsAction() публичный Метод

.
public getArticlePlaylistsAction ( Request $request, $number, $language = null ) : array
$request Symfony\Component\HttpFoundation\Request
Результат array

getArticlesAction() публичный Метод

Get Articles.
public getArticlesAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
Результат array

linkArticleAction() публичный Метод

**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
Результат Article

lockUnlockArticle() публичный Метод

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

patchArticleAction() публичный Метод

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() публичный Метод

Get related articles.
public relatedArticlesAction ( Request $request, $number, $language = null ) : array
$request Symfony\Component\HttpFoundation\Request
Результат array

searchArticlesAction() публичный Метод

Parameter 'query' contains keywords seperated with ",". Example: test,article,keyword3
public searchArticlesAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
Результат array

unlinkArticleAction() публичный Метод

**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
Результат Article