PHP Class Ojs\ApiBundle\Controller\Admin\PostRestController

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

Public Methods

Method Description
deletePostAction ( $id ) : Response
getPostAction ( integer $id ) : array Get single Post.
getPostsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Posts.
newPostAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Post.
patchPostAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing post from the submitted data or create a new post at a specific location.
postPostAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Post from the submitted data.
putPostAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Post from the submitted data or create a new Post at a specific location.

Protected Methods

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

Method Details

deletePostAction() public method

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

getOr404() protected method

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

getPostAction() public method

Get single Post.
public getPostAction ( integer $id ) : array
$id integer the Post id
return array

getPostsAction() public method

List all Posts.
public getPostsAction ( 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

newPostAction() public method

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

patchPostAction() public method

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

postPostAction() public method

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

putPostAction() public method

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