PHP Class Ojs\ApiBundle\Controller\Journal\JournalArticleFileRestController

Inheritance: extends Ojs\ApiBundle\Controller\ApiController
Show file Open project: ojs/ojs

Public Methods

Method Description
deleteFileAction ( $id ) : Response
getFileAction ( integer $id ) : array Get single ArticleFile.
getFilesAction ( FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all ArticleFiles.
newFileAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new ArticleFile.
patchFileAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing article file from the submitted data or create a new article file at a specific location.
postFileAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a ArticleFile from the submitted data.
putFileAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing ArticleFile from the submitted data or create a new ArticleFile at a specific location.

Protected Methods

Method Description
getOr404 ( mixed $id, boolean $normalize = false ) : Ojs\JournalBundle\Entity\ArticleFile Fetch a ArticleFile or throw an 404 Exception.

Method Details

deleteFileAction() public method

public deleteFileAction ( $id ) : Response
$id
return Symfony\Component\HttpFoundation\Response

getFileAction() public method

Get single ArticleFile.
public getFileAction ( integer $id ) : array
$id integer the ArticleFile id
return array

getFilesAction() public method

List all ArticleFiles.
public getFilesAction ( FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array
$paramFetcher FOS\RestBundle\Request\ParamFetcherInterface param fetcher service
return array

getOr404() protected method

Fetch a ArticleFile or throw an 404 Exception.
protected getOr404 ( mixed $id, boolean $normalize = false ) : Ojs\JournalBundle\Entity\ArticleFile
$id mixed
$normalize boolean
return Ojs\JournalBundle\Entity\ArticleFile

newFileAction() public method

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

patchFileAction() public method

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

postFileAction() public method

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

putFileAction() public method

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