eZPublishCommunityProject  2013.9
eZ\Publish\Core\REST\Server\Controller\User Class Reference

User controller. More...

+ Inheritance diagram for eZ\Publish\Core\REST\Server\Controller\User:
+ Collaboration diagram for eZ\Publish\Core\REST\Server\Controller\User:

Public Member Functions

 __construct (UserService $userService, RoleService $roleService, ContentService $contentService, ContentTypeService $contentTypeService, LocationService $locationService, SectionService $sectionService, Repository $repository)
 Construct controller. More...
 
 assignUserToUserGroup ($userId)
 Assigns the user to a user group. More...
 
 createUser ($groupPath)
 Create a new user group in the given group. More...
 
 createUserGroup ($groupPath)
 Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups. More...
 
 deleteUser ($userId)
 Given user is deleted. More...
 
 deleteUserGroup ($groupPath)
 Given user group is deleted. More...
 
 loadRootUserGroup ()
 Redirects to the root user group. More...
 
 loadSubUserGroups ($groupPath)
 Returns a list of the sub groups. More...
 
 loadUser ($userId)
 Loads a user for the given ID. More...
 
 loadUserByRemoteId ()
 Loads a user by its remote ID. More...
 
 loadUserDrafts ($userId)
 Loads drafts assigned to user. More...
 
 loadUserGroup ($groupPath)
 Loads a user group for the given path. More...
 
 loadUserGroupByRemoteId ()
 Loads a user group by its remote ID. More...
 
 loadUserGroups ()
 Loads user groups. More...
 
 loadUserGroupsAssignedToRole ()
 Loads a list of user groups assigned to role. More...
 
 loadUserGroupsOfUser ($userId)
 Returns a list of user groups the user belongs to. More...
 
 loadUsers ()
 Loads users. More...
 
 loadUsersAssignedToRole ()
 Loads a list of users assigned to role. More...
 
 loadUsersFromGroup ($groupPath)
 Loads the users of the group with the given path. More...
 
 moveUserGroup ($groupPath)
 Moves the user group to another parent. More...
 
 unassignUserFromUserGroup ($userId, $groupPath)
 Unassigns the user from a user group. More...
 
 updateUser ($userId)
 Updates a user. More...
 
 updateUserGroup ($groupPath)
 Updates a user group. More...
 
- Public Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
 setContainer (Container $container)
 
 setInputDispatcher (InputDispatcher $inputDispatcher)
 
 setRepository (Repository $repository)
 
 setRequest (Request $request=null)
 
 setRequestParser (RequestParser $requestParser)
 
 setRouter (RouterInterface $router)
 

Protected Attributes

 $contentService
 
 $contentTypeService
 
 $locationService
 
 $repository
 
 $roleService
 
 $sectionService
 
 $userService
 
- Protected Attributes inherited from eZ\Publish\Core\REST\Server\Controller
 $container
 
 $inputDispatcher
 
 $repository
 
 $request
 
 $requestParser
 
 $router
 

Private Member Functions

 extractLocationIdFromPath ($path)
 Extracts and returns an item id from a path, e.g. More...
 

Additional Inherited Members

- Protected Member Functions inherited from eZ\Publish\Core\REST\Server\Controller
 getMediaType ()
 Extracts the requested media type from $request. More...
 

Detailed Description

User controller.

Constructor & Destructor Documentation

eZ\Publish\Core\REST\Server\Controller\User::__construct ( UserService  $userService,
RoleService  $roleService,
ContentService  $contentService,
ContentTypeService  $contentTypeService,
LocationService  $locationService,
SectionService  $sectionService,
Repository  $repository 
)

Construct controller.

Parameters
\eZ\Publish\API\Repository\UserService$userService
\eZ\Publish\API\Repository\RoleService$roleService
\eZ\Publish\API\Repository\ContentService$contentService
\eZ\Publish\API\Repository\LocationService$locationService
\eZ\Publish\API\Repository\SectionService$sectionService
\eZ\Publish\API\Repository\Repository$repository

Member Function Documentation

eZ\Publish\Core\REST\Server\Controller\User::assignUserToUserGroup (   $userId)

Assigns the user to a user group.

Parameters
$userId
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::createUser (   $groupPath)

Create a new user group in the given group.

Parameters
$groupPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::createUserGroup (   $groupPath)

Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups.

Parameters
$groupPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\BadRequestException
Returns
eZ\Publish\Core\REST\Server\Controller\User::deleteUser (   $userId)

Given user is deleted.

Parameters
$userId
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::deleteUserGroup (   $groupPath)

Given user group is deleted.

Parameters
$groupPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::loadRootUserGroup ( )

Redirects to the root user group.

Returns
eZ\Publish\Core\REST\Server\Controller\User::loadSubUserGroups (   $groupPath)

Returns a list of the sub groups.

Parameters
$groupPath
Returns
|
eZ\Publish\Core\REST\Server\Controller\User::loadUser (   $userId)

Loads a user for the given ID.

Parameters
$userId
Returns
eZ\Publish\Core\REST\Server\Controller\User::loadUserByRemoteId ( )

Loads a user by its remote ID.

Returns

Referenced by eZ\Publish\Core\REST\Server\Controller\User\loadUsers().

eZ\Publish\Core\REST\Server\Controller\User::loadUserDrafts (   $userId)

Loads drafts assigned to user.

Parameters
$userId
Returns
eZ\Publish\Core\REST\Server\Controller\User::loadUserGroup (   $groupPath)

Loads a user group for the given path.

Parameters
$groupPath
Returns
eZ\Publish\Core\REST\Server\Controller\User::loadUserGroupByRemoteId ( )

Loads a user group by its remote ID.

Returns

Referenced by eZ\Publish\Core\REST\Server\Controller\User\loadUserGroups().

eZ\Publish\Core\REST\Server\Controller\User::loadUserGroups ( )

Loads user groups.

Returns
|
eZ\Publish\Core\REST\Server\Controller\User::loadUserGroupsAssignedToRole ( )

Loads a list of user groups assigned to role.

Returns
[]

Referenced by eZ\Publish\Core\REST\Server\Controller\User\loadUserGroups().

eZ\Publish\Core\REST\Server\Controller\User::loadUserGroupsOfUser (   $userId)

Returns a list of user groups the user belongs to.

The returned list includes the resources for unassigning a user group if the user is in multiple groups.

Parameters
$userId
Returns
eZ\Publish\Core\REST\Server\Controller\User::loadUsers ( )

Loads users.

Returns
|
eZ\Publish\Core\REST\Server\Controller\User::loadUsersAssignedToRole ( )

Loads a list of users assigned to role.

Returns
[]

Referenced by eZ\Publish\Core\REST\Server\Controller\User\loadUsers().

eZ\Publish\Core\REST\Server\Controller\User::loadUsersFromGroup (   $groupPath)

Loads the users of the group with the given path.

Parameters
$groupPath
Returns
|
eZ\Publish\Core\REST\Server\Controller\User::moveUserGroup (   $groupPath)

Moves the user group to another parent.

Parameters
$groupPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::unassignUserFromUserGroup (   $userId,
  $groupPath 
)

Unassigns the user from a user group.

Parameters
$userId
$groupPath
Exceptions
\eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Returns
eZ\Publish\Core\REST\Server\Controller\User::updateUser (   $userId)

Updates a user.

Parameters
$userId
Returns
eZ\Publish\Core\REST\Server\Controller\User::updateUserGroup (   $groupPath)

Updates a user group.

Parameters
$groupPath
Returns

Member Data Documentation

eZ\Publish\Core\REST\Server\Controller\User::$contentService
protected
eZ\Publish\Core\REST\Server\Controller\User::$contentTypeService
protected
eZ\Publish\Core\REST\Server\Controller\User::$locationService
protected
eZ\Publish\Core\REST\Server\Controller\User::$repository
protected
eZ\Publish\Core\REST\Server\Controller\User::$roleService
protected
eZ\Publish\Core\REST\Server\Controller\User::$sectionService
protected
eZ\Publish\Core\REST\Server\Controller\User::$userService
protected

The documentation for this class was generated from the following file: