PHP Class eZ\Publish\Core\REST\Server\Controller\User

Inheritance: extends eZ\Publish\Core\REST\Server\Controller
Afficher le fichier Open project: ezsystems/ezpublish-kernel

Protected Properties

Свойство Type Description
$contentService eZ\Publish\API\Repository\ContentService Content service.
$contentTypeService eZ\Publish\API\Repository\ContentTypeService Content service.
$locationService eZ\Publish\API\Repository\LocationService Location service.
$repository eZ\Publish\API\Repository\Repository Repository.
$roleService eZ\Publish\API\Repository\RoleService Role service.
$sectionService eZ\Publish\API\Repository\SectionService Section service.
$userService eZ\Publish\API\Repository\UserService User service.

Méthodes publiques

Méthode Description
__construct ( eZ\Publish\API\Repository\UserService $userService, eZ\Publish\API\Repository\RoleService $roleService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\SectionService $sectionService, eZ\Publish\API\Repository\Repository $repository ) Construct controller.
assignUserToUserGroup ( $userId, Request $request ) : UserGroupRefList Assigns the user to a user group.
createSession ( Request $request ) : UserSession | eZ\Publish\Core\REST\Server\Values\Conflict Creates a new session based on the credentials provided as POST parameters.
createUser ( $groupPath, Request $request ) : CreatedUser Create a new user group in the given group.
createUserGroup ( $groupPath, Request $request ) : CreatedUserGroup Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups.
deleteSession ( string $sessionId, Request $request ) : DeletedUserSession | Response Deletes given session.
deleteUser ( $userId ) : eZ\Publish\Core\REST\Server\Values\NoContent Given user is deleted.
deleteUserGroup ( $groupPath ) : eZ\Publish\Core\REST\Server\Values\NoContent Given user group is deleted.
loadRootUserGroup ( ) : PermanentRedirect Redirects to the root user group.
loadSubUserGroups ( $groupPath, Request $request ) : UserGroupList | UserGroupRefList Returns a list of the sub groups.
loadUser ( $userId ) : RestUser Loads a user for the given ID.
loadUserDrafts ( $userId, Request $request ) : VersionList Loads drafts assigned to user.
loadUserGroup ( $groupPath ) : RestUserGroup Loads a user group for the given path.
loadUserGroupByRemoteId ( Request $request ) : RestUserGroup Loads a user group by its remote ID.
loadUserGroups ( Request $request ) : UserGroupList | UserGroupRefList Loads user groups.
loadUserGroupsAssignedToRole ( mixed $roleId ) : RestUserGroup[] Loads a list of user groups assigned to role.
loadUserGroupsOfUser ( $userId, Request $request ) : UserGroupRefList Returns a list of user groups the user belongs to.
loadUsers ( Request $request ) : UserList | UserRefList Loads users.
loadUsersAssignedToRole ( mixed $roleId ) : RestUser[] Loads a list of users assigned to role.
loadUsersFromGroup ( $groupPath, Request $request ) : UserList | UserRefList Loads the users of the group with the given path.
moveUserGroup ( $groupPath, Request $request ) : ResourceCreated Moves the user group to another parent.
refreshSession ( string $sessionId, Request $request ) : UserSession Refresh given session.
setSessionController ( SessionController $sessionController )
setTokenStorage ( Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface $csrfTokenStorage )
unassignUserFromUserGroup ( $userId, $groupPath ) : UserGroupRefList Unassigns the user from a user group.
updateUser ( $userId, Request $request ) : RestUser Updates a user.
updateUserGroup ( $groupPath, Request $request ) : RestUserGroup Updates a user group.
verifyUsers ( Request $request )

Private Methods

Méthode Description
buildRestUserObject ( eZ\Publish\API\Repository\Values\User\User $user ) : RestUser
extractLocationIdFromPath ( string $path ) : mixed Extracts and returns an item id from a path, e.g. /1/2/58 => 58.

Method Details

__construct() public méthode

Construct controller.
public __construct ( eZ\Publish\API\Repository\UserService $userService, eZ\Publish\API\Repository\RoleService $roleService, eZ\Publish\API\Repository\ContentService $contentService, eZ\Publish\API\Repository\ContentTypeService $contentTypeService, eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\SectionService $sectionService, eZ\Publish\API\Repository\Repository $repository )
$userService eZ\Publish\API\Repository\UserService
$roleService eZ\Publish\API\Repository\RoleService
$contentService eZ\Publish\API\Repository\ContentService
$contentTypeService eZ\Publish\API\Repository\ContentTypeService
$locationService eZ\Publish\API\Repository\LocationService
$sectionService eZ\Publish\API\Repository\SectionService
$repository eZ\Publish\API\Repository\Repository

assignUserToUserGroup() public méthode

Assigns the user to a user group.
public assignUserToUserGroup ( $userId, Request $request ) : UserGroupRefList
$userId
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserGroupRefList

createSession() public méthode

Creates a new session based on the credentials provided as POST parameters.
Deprecation: Deprecated since 6.5. Use SessionController::refreshSessionAction().
public createSession ( Request $request ) : UserSession | eZ\Publish\Core\REST\Server\Values\Conflict
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserSession | eZ\Publish\Core\REST\Server\Values\Conflict

createUser() public méthode

Create a new user group in the given group.
public createUser ( $groupPath, Request $request ) : CreatedUser
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\CreatedUser

createUserGroup() public méthode

Create a new user group under the given parent To create a top level group use /user/groups/1/5/subgroups.
public createUserGroup ( $groupPath, Request $request ) : CreatedUserGroup
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\CreatedUserGroup

deleteSession() public méthode

Deletes given session.
Deprecation: Deprecated since 6.5. Use SessionController::refreshSessionAction().
public deleteSession ( string $sessionId, Request $request ) : DeletedUserSession | Response
$sessionId string
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\DeletedUserSession | Symfony\Component\HttpFoundation\Response

deleteUser() public méthode

Given user is deleted.
public deleteUser ( $userId ) : eZ\Publish\Core\REST\Server\Values\NoContent
$userId
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

deleteUserGroup() public méthode

Given user group is deleted.
public deleteUserGroup ( $groupPath ) : eZ\Publish\Core\REST\Server\Values\NoContent
$groupPath
Résultat eZ\Publish\Core\REST\Server\Values\NoContent

loadRootUserGroup() public méthode

Redirects to the root user group.
public loadRootUserGroup ( ) : PermanentRedirect
Résultat eZ\Publish\Core\REST\Server\Values\PermanentRedirect

loadSubUserGroups() public méthode

Returns a list of the sub groups.
public loadSubUserGroups ( $groupPath, Request $request ) : UserGroupList | UserGroupRefList
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserGroupList | eZ\Publish\Core\REST\Server\Values\UserGroupRefList

loadUser() public méthode

Loads a user for the given ID.
public loadUser ( $userId ) : RestUser
$userId
Résultat eZ\Publish\Core\REST\Server\Values\RestUser

loadUserDrafts() public méthode

Loads drafts assigned to user.
public loadUserDrafts ( $userId, Request $request ) : VersionList
$userId
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\VersionList

loadUserGroup() public méthode

Loads a user group for the given path.
public loadUserGroup ( $groupPath ) : RestUserGroup
$groupPath
Résultat eZ\Publish\Core\REST\Server\Values\RestUserGroup

loadUserGroupByRemoteId() public méthode

Loads a user group by its remote ID.
public loadUserGroupByRemoteId ( Request $request ) : RestUserGroup
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\RestUserGroup

loadUserGroups() public méthode

Loads user groups.
public loadUserGroups ( Request $request ) : UserGroupList | UserGroupRefList
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserGroupList | eZ\Publish\Core\REST\Server\Values\UserGroupRefList

loadUserGroupsAssignedToRole() public méthode

Loads a list of user groups assigned to role.
public loadUserGroupsAssignedToRole ( mixed $roleId ) : RestUserGroup[]
$roleId mixed
Résultat eZ\Publish\Core\REST\Server\Values\RestUserGroup[]

loadUserGroupsOfUser() public méthode

The returned list includes the resources for unassigning a user group if the user is in multiple groups.
public loadUserGroupsOfUser ( $userId, Request $request ) : UserGroupRefList
$userId
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserGroupRefList

loadUsers() public méthode

Loads users.
public loadUsers ( Request $request ) : UserList | UserRefList
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserList | eZ\Publish\Core\REST\Server\Values\UserRefList

loadUsersAssignedToRole() public méthode

Loads a list of users assigned to role.
public loadUsersAssignedToRole ( mixed $roleId ) : RestUser[]
$roleId mixed
Résultat eZ\Publish\Core\REST\Server\Values\RestUser[]

loadUsersFromGroup() public méthode

Loads the users of the group with the given path.
public loadUsersFromGroup ( $groupPath, Request $request ) : UserList | UserRefList
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserList | eZ\Publish\Core\REST\Server\Values\UserRefList

moveUserGroup() public méthode

Moves the user group to another parent.
public moveUserGroup ( $groupPath, Request $request ) : ResourceCreated
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\ResourceCreated

refreshSession() public méthode

Refresh given session.
Deprecation: Deprecated since 6.5. Use SessionController::refreshSessionAction().
public refreshSession ( string $sessionId, Request $request ) : UserSession
$sessionId string
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\UserSession

setSessionController() public méthode

public setSessionController ( SessionController $sessionController )
$sessionController SessionController

setTokenStorage() public méthode

public setTokenStorage ( Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface $csrfTokenStorage )
$csrfTokenStorage Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface

unassignUserFromUserGroup() public méthode

Unassigns the user from a user group.
public unassignUserFromUserGroup ( $userId, $groupPath ) : UserGroupRefList
$userId
$groupPath
Résultat eZ\Publish\Core\REST\Server\Values\UserGroupRefList

updateUser() public méthode

Updates a user.
public updateUser ( $userId, Request $request ) : RestUser
$userId
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\RestUser

updateUserGroup() public méthode

Updates a user group.
public updateUserGroup ( $groupPath, Request $request ) : RestUserGroup
$groupPath
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\RestUserGroup

verifyUsers() public méthode

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

Property Details

$contentService protected_oe property

Content service.
protected ContentService,eZ\Publish\API\Repository $contentService
Résultat eZ\Publish\API\Repository\ContentService

$contentTypeService protected_oe property

Content service.
protected ContentTypeService,eZ\Publish\API\Repository $contentTypeService
Résultat eZ\Publish\API\Repository\ContentTypeService

$locationService protected_oe property

Location service.
protected LocationService,eZ\Publish\API\Repository $locationService
Résultat eZ\Publish\API\Repository\LocationService

$repository protected_oe property

Repository.
protected Repository,eZ\Publish\API\Repository $repository
Résultat eZ\Publish\API\Repository\Repository

$roleService protected_oe property

Role service.
protected RoleService,eZ\Publish\API\Repository $roleService
Résultat eZ\Publish\API\Repository\RoleService

$sectionService protected_oe property

Section service.
protected SectionService,eZ\Publish\API\Repository $sectionService
Résultat eZ\Publish\API\Repository\SectionService

$userService protected_oe property

User service.
protected UserService,eZ\Publish\API\Repository $userService
Résultat eZ\Publish\API\Repository\UserService