PHP Class Ojs\ApiBundle\Controller\Admin\InstitutionRestController

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

Public Methods

Method Description
deleteInstitutionAction ( $id ) : Response
getInstitutionAction ( integer $id ) : array Get single Institution.
getInstitutionsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Institutions.
newInstitutionAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Institution.
patchInstitutionAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing institution from the submitted data or create a new institution at a specific location.
postInstitutionAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Institution from the submitted data.
putInstitutionAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Institution from the submitted data or create a new Institution at a specific location.

Protected Methods

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

Method Details

deleteInstitutionAction() public method

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

getInstitutionAction() public method

Get single Institution.
public getInstitutionAction ( integer $id ) : array
$id integer the Institution id
return array

getInstitutionsAction() public method

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

newInstitutionAction() public method

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

patchInstitutionAction() public method

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

postInstitutionAction() public method

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

putInstitutionAction() public method

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