PHP Class Ojs\ApiBundle\Controller\Admin\PageRestController

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

Public Methods

Method Description
deletePageAction ( $id ) : Response
getPageAction ( integer $id ) : array Get single Page.
getPagesAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Pages.
newPageAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Page.
patchPageAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing page from the submitted data or create a new page at a specific location.
postPageAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Page from the submitted data.
putPageAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Page from the submitted data or create a new Page at a specific location.

Protected Methods

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

Method Details

deletePageAction() public method

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

getOr404() protected method

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

getPageAction() public method

Get single Page.
public getPageAction ( integer $id ) : array
$id integer the Page id
return array

getPagesAction() public method

List all Pages.
public getPagesAction ( 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

newPageAction() public method

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

patchPageAction() public method

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

postPageAction() public method

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

putPageAction() public method

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