PHP Class Ojs\ApiBundle\Controller\Admin\ContactRestController

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

Public Methods

Method Description
deleteContactAction ( $id ) : Response
getContactAction ( integer $id ) : array Get single Contact.
getContactsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Contacts.
newContactAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Contact.
patchContactAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing contact from the submitted data or create a new contact at a specific location.
postContactAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Contact from the submitted data.
putContactAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Contact from the submitted data or create a new Contact at a specific location.

Protected Methods

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

Method Details

deleteContactAction() public method

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

getContactAction() public method

Get single Contact.
public getContactAction ( integer $id ) : array
$id integer the Contact id
return array

getContactsAction() public method

List all Contacts.
public getContactsAction ( 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 or throw an 404 Exception.
protected getOr404 ( mixed $id ) : JournalContact
$id mixed
return Ojs\JournalBundle\Entity\JournalContact

newContactAction() public method

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

patchContactAction() public method

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

postContactAction() public method

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

putContactAction() public method

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