PHP Class Ojs\ApiBundle\Controller\Admin\JournalRestController

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

Public Methods

Method Description
deleteJournalAction ( $id ) : Response
getJournalAction ( integer $id ) : array Get single Journal.
getJournalsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Journals.
newJournalAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Journal.
patchJournalAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing journal from the submitted data or create a new journal at a specific location.
postJournalAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Journal from the submitted data.
putJournalAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Journal from the submitted data or create a new Journal at a specific location.

Protected Methods

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

Method Details

deleteJournalAction() public method

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

getJournalAction() public method

Get single Journal.
public getJournalAction ( integer $id ) : array
$id integer the Journal id
return array

getJournalsAction() public method

List all Journals.
public getJournalsAction ( 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 Journal or throw an 404 Exception.
protected getOr404 ( mixed $id, boolean $normalize = false ) : Journal
$id mixed
$normalize boolean
return Ojs\JournalBundle\Entity\Journal

newJournalAction() public method

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

patchJournalAction() public method

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

postJournalAction() public method

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

putJournalAction() public method

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