PHP Class Ojs\ApiBundle\Controller\Journal\JournalArticleRestController

Inheritance: extends Ojs\ApiBundle\Controller\ApiController
ファイルを表示 Open project: ojs/ojs

Public Methods

Method Description
deleteArticleAction ( $id ) : Response
getArticleAction ( integer $id ) : array Get single Article.
getArticlesAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Articles.
newArticleAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Article.
patchArticleAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing journal_article from the submitted data or create a new journal_article at a specific location.
postArticleAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Article from the submitted data.
putArticleAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Article from the submitted data or create a new Article at a specific location.

Protected Methods

Method Description
getOr404 ( mixed $id, boolean $normalize = false ) : Article Fetch a Article or throw an 404 Exception.

Method Details

deleteArticleAction() public method

public deleteArticleAction ( $id ) : Response
$id
return Response

getArticleAction() public method

Get single Article.
public getArticleAction ( integer $id ) : array
$id integer the Article id
return array

getArticlesAction() public method

List all Articles.
public getArticlesAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array
$request Symfony\Component\HttpFoundation\Request the request object
$paramFetcher FOS\RestBundle\Request\ParamFetcherInterface param fetcher service
return array

getOr404() protected method

Fetch a Article or throw an 404 Exception.
protected getOr404 ( mixed $id, boolean $normalize = false ) : Article
$id mixed
$normalize boolean
return Ojs\JournalBundle\Entity\Article

newArticleAction() public method

Presents the form to use to create a new Article.
public newArticleAction ( ) : Symfony\Component\Form\FormTypeInterface
return Symfony\Component\Form\FormTypeInterface

patchArticleAction() public method

Update existing journal_article from the submitted data or create a new journal_article at a specific location.
public patchArticleAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View
$request Symfony\Component\HttpFoundation\Request the request object
$id integer the journal_article id
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View

postArticleAction() public method

Create a Article from the submitted data.
public postArticleAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View
$request Symfony\Component\HttpFoundation\Request the request object
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View

putArticleAction() public method

Update existing Article from the submitted data or create a new Article at a specific location.
public putArticleAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View
$request Symfony\Component\HttpFoundation\Request the request object
$id integer the Article id
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View