PHP Class Sulu\Bundle\SecurityBundle\Controller\GroupController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface
Mostrar archivo Open project: sulu/sulu

Protected Properties

Property Type Description
$entityKey
$entityName
$fieldDescriptors - Holds the field descriptors for the list response

Public Methods

Method Description
__construct ( ) TODO: move the field descriptors to a manager
cgetAction ( Request $request ) : Response returns all groups.
deleteAction ( $id ) : Response Deletes the group with the given id.
getAction ( $id ) : Response Returns the group with the given id.
getSecurityContext ( ) : mixed Returns the SecurityContext required for the controller.
postAction ( Request $request ) : Response Creates a new group with the given data.
putAction ( Request $request, $id ) : Response Updates the group with the given id and the data given by the request.
setParent ( $group )

Protected Methods

Method Description
processRoles ( Group $group, array $roles ) : boolean Process all roles from request.

Private Methods

Method Description
addRole ( Group $group, array $roleData ) : boolean Adds the given role to the group.
updateRole ( Sulu\Component\Security\Authentication\RoleInterface $role, $roleData ) : boolean Updates an already existing role.

Method Details

__construct() public method

TODO: move the field descriptors to a manager
public __construct ( )

cgetAction() public method

returns all groups.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

deleteAction() public method

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

getAction() public method

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

getSecurityContext() public method

Returns the SecurityContext required for the controller.
public getSecurityContext ( ) : mixed
return mixed

postAction() public method

Creates a new group with the given data.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

processRoles() protected method

Process all roles from request.
protected processRoles ( Group $group, array $roles ) : boolean
$group Sulu\Bundle\SecurityBundle\Entity\Group The contact on which is worked
$roles array The roles to process
return boolean True if the processing was successful, otherwise false

putAction() public method

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

setParent() public method

public setParent ( $group )
$group

Property Details

$entityKey protected_oe static_oe property

protected static $entityKey

$entityName protected_oe static_oe property

protected static $entityName

$fieldDescriptors protected_oe property

- Holds the field descriptors for the list response
protected $fieldDescriptors