PHP Class Ojs\ApiBundle\Controller\Admin\ContactTypesRestController

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

Public Methods

Method Description
deleteContacttypeAction ( $id ) : Response
getContacttypeAction ( integer $id ) : array Get single Contact Type.
getContacttypesAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all contact types.
newContacttypeAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new contact type.
patchContacttypeAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\View Update existing contact type from the submitted data or create a new contact type at a specific location.
postContacttypeAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\View Create a Contact Type from the submitted data.
putContacttypeAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\View Update existing contact type from the submitted data or create a new contact type at a specific location.

Protected Methods

Method Description
getOr404 ( mixed $id ) : Ojs\ApiBundle\Model\ContactTypesInterface Fetch a Contact Type or throw an 404 Exception.

Method Details

deleteContacttypeAction() public method

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

getContacttypeAction() public method

Get single Contact Type.
public getContacttypeAction ( integer $id ) : array
$id integer the contact type id
return array

getContacttypesAction() public method

List all contact types.
public getContacttypesAction ( 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 Contact Type or throw an 404 Exception.
protected getOr404 ( mixed $id ) : Ojs\ApiBundle\Model\ContactTypesInterface
$id mixed
return Ojs\ApiBundle\Model\ContactTypesInterface

newContacttypeAction() public method

Presents the form to use to create a new contact type.
public newContacttypeAction ( ) : Symfony\Component\Form\FormTypeInterface
return Symfony\Component\Form\FormTypeInterface

patchContacttypeAction() public method

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

postContacttypeAction() public method

Create a Contact Type from the submitted data.
public postContacttypeAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\View
$request Symfony\Component\HttpFoundation\Request the request object
return Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\View\View

putContacttypeAction() public method

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