PHP Class Ojs\ApiBundle\Controller\Admin\SubjectRestController

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

Public Methods

Method Description
deleteSubjectAction ( $id ) : Response
getSubjectAction ( integer $id ) : array Get single Subject.
getSubjectsAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Subjects.
newSubjectAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new Subject.
patchSubjectAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing subject from the submitted data or create a new subject at a specific location.
postSubjectAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a Subject from the submitted data.
putSubjectAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing Subject from the submitted data or create a new Subject at a specific location.

Protected Methods

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

Method Details

deleteSubjectAction() public method

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

getOr404() protected method

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

getSubjectAction() public method

Get single Subject.
public getSubjectAction ( integer $id ) : array
$id integer the Subject id
return array

getSubjectsAction() public method

List all Subjects.
public getSubjectsAction ( 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

newSubjectAction() public method

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

patchSubjectAction() public method

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

postSubjectAction() public method

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

putSubjectAction() public method

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