PHP Class Ojs\ApiBundle\Controller\Admin\PeriodRestController

Inheritance: extends FOS\RestBundle\Controller\FOSRestController
Datei anzeigen Open project: ojs/ojs

Public Methods

Method Description
deletePeriodAction ( $id ) : Response
getPeriodAction ( integer $id ) : array Get single Period.
getPeriodsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Periods.
newPeriodAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Period.
patchPeriodAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing period from the submitted data or create a new period at a specific location.
postPeriodAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Period from the submitted data.
putPeriodAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Period from the submitted data or create a new Period at a specific location.

Protected Methods

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

Method Details

deletePeriodAction() public method

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

getOr404() protected method

Fetch a Period or throw an 404 Exception.
protected getOr404 ( mixed $id ) : Period
$id mixed
return Ojs\JournalBundle\Entity\Period

getPeriodAction() public method

Get single Period.
public getPeriodAction ( integer $id ) : array
$id integer the Period id
return array

getPeriodsAction() public method

List all Periods.
public getPeriodsAction ( 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

newPeriodAction() public method

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

patchPeriodAction() public method

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

postPeriodAction() public method

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

putPeriodAction() public method

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