PHP Class Ojs\ApiBundle\Controller\Admin\UserRestController

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

Public Methods

Method Description
getUserAction ( integer $id ) : array Get single User.
getUsersAction ( Request $request, FOS\RestBundle\Request\ParamFetcherInterface $paramFetcher ) : array List all Users.
newUserAction ( ) : Symfony\Component\Form\FormTypeInterface Presents the form to use to create a new User.
patchUserAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing user from the submitted data or create a new user at a specific location.
postUserAction ( Request $request ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Create a User from the submitted data.
putUserAction ( Request $request, integer $id ) : Symfony\Component\Form\FormTypeInterface | FOS\RestBundle\Controller\Annotations\View Update existing User from the submitted data or create a new User at a specific location.

Protected Methods

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

Method Details

getOr404() protected method

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

getUserAction() public method

Get single User.
public getUserAction ( integer $id ) : array
$id integer the User id
return array

getUsersAction() public method

List all Users.
public getUsersAction ( 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

newUserAction() public method

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

patchUserAction() public method

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

postUserAction() public method

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

putUserAction() public method

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