PHP Class Ojs\ApiBundle\Controller\Admin\LangRestController

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

Public Methods

Method Description
deleteLangAction ( $id ) : Response
getLangAction ( integer $id ) : array Get single Lang.
getLangsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Langs.
newLangAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Lang.
patchLangAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing lang from the submitted data or create a new lang at a specific location.
postLangAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Lang from the submitted data.
putLangAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Lang from the submitted data or create a new Lang at a specific location.

Protected Methods

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

Method Details

deleteLangAction() public method

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

getLangAction() public method

Get single Lang.
public getLangAction ( integer $id ) : array
$id integer the Lang id
return array

getLangsAction() public method

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

newLangAction() public method

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

patchLangAction() public method

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

postLangAction() public method

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

putLangAction() public method

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