PHP Class Ojs\ApiBundle\Controller\Admin\ArticleTypeRestController

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

Public Methods

Method Description
deleteArticletypeAction ( $id ) : Response
getArticletypeAction ( integer $id ) : array Get single ArticleType.
getArticletypesAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all ArticleTypes.
newArticletypeAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new ArticleType.
patchArticletypeAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing article_type from the submitted data or create a new article_type at a specific location.
postArticletypeAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a ArticleType from the submitted data.
putArticletypeAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing ArticleType from the submitted data or create a new ArticleType at a specific location.

Protected Methods

Method Description
getOr404 ( mixed $id ) : ArticleTypes Fetch a ArticleType or throw an 404 Exception.

Method Details

deleteArticletypeAction() public method

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

getArticletypeAction() public method

Get single ArticleType.
public getArticletypeAction ( integer $id ) : array
$id integer the ArticleType id
return array

getArticletypesAction() public method

List all ArticleTypes.
public getArticletypesAction ( 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 ArticleType or throw an 404 Exception.
protected getOr404 ( mixed $id ) : ArticleTypes
$id mixed
return Ojs\JournalBundle\Entity\ArticleTypes

newArticletypeAction() public method

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

patchArticletypeAction() public method

Update existing article_type from the submitted data or create a new article_type at a specific location.
public patchArticletypeAction ( 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_type id
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View

postArticletypeAction() public method

Create a ArticleType from the submitted data.
public postArticletypeAction ( 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

putArticletypeAction() public method

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