PHP Class Sulu\Bundle\SecurityBundle\Controller\UserController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface, use trait Sulu\Component\Rest\RequestParametersTrait
显示文件 Open project: sulu/sulu

Protected Properties

Property Type Description
$entityKey
$fieldDescriptors Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[] Contains the field descriptors used by the list response.

Public Methods

Method Description
cgetAction ( Request $request ) : Response Returns a user with a specific contact id or all users optional parameter 'flat' calls listAction.
deleteAction ( integer $id ) : Response Deletes the user with the given id.
getAction ( integer $id ) : Response Returns the user with the given id.
getLocale ( Request $request )
getSecurityContext ( )
patchAction ( Request $request, integer $id ) : Response Partly updates a user entity for a given id.
postAction ( Request $request ) : Response Creates a new user in the system.
postEnableUserAction ( integer $id, Request $request ) : Response
putAction ( Request $request, integer $id ) : Response Updates the given user with the given data.

Protected Methods

Method Description
getFieldDescriptors ( ) TODO: move field descriptors to a manager

Private Methods

Method Description
addSerializationGroups ( $view ) Adds the necessary serialization groups to the given view.
checkArguments ( Request $request ) https://github.com/sulu-io/sulu/issues/1136
getUserManager ( ) : UserManager Returns the UserManager.
initFieldDescriptors ( )

Method Details

cgetAction() public method

Returns a user with a specific contact id or all users optional parameter 'flat' calls listAction.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

deleteAction() public method

Deletes the user with the given id.
public deleteAction ( integer $id ) : Response
$id integer
return Symfony\Component\HttpFoundation\Response

getAction() public method

Returns the user with the given id.
public getAction ( integer $id ) : Response
$id integer
return Symfony\Component\HttpFoundation\Response

getFieldDescriptors() protected method

TODO: move field descriptors to a manager
protected getFieldDescriptors ( )

getLocale() public method

public getLocale ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getSecurityContext() public method

public getSecurityContext ( )

patchAction() public method

Partly updates a user entity for a given id.
public patchAction ( Request $request, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$id integer
return Symfony\Component\HttpFoundation\Response

postAction() public method

Creates a new user in the system.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

postEnableUserAction() public method

public postEnableUserAction ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

putAction() public method

Updates the given user with the given data.
public putAction ( Request $request, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$id integer
return Symfony\Component\HttpFoundation\Response

Property Details

$entityKey protected_oe static_oe property

protected static $entityKey

$fieldDescriptors protected_oe property

Contains the field descriptors used by the list response.
protected DoctrineFieldDescriptor[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $fieldDescriptors
return Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]