PHP Class Neos\Neos\Service\UserService

The methods getters of this class are accessible via the "context.userInformation" variable in security policies and thus are implicitly considered to be part of the public API. This UserService should be replaced by \Neos\Neos\Domain\Service\UserService in the long run.
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$defaultLanguageIdentifier string
$userDomainService Neos\Neos\Domain\Service\UserService
$workspaceRepository Neos\ContentRepository\Domain\Repository\WorkspaceRepository

Méthodes publiques

Méthode Description
getBackendUser ( ) : User Returns the current backend user
getInterfaceLanguage ( ) : string Returns the interface language the user selected. Will fall back to the default language defined in settings
getPersonalWorkspace ( ) : Workspace Returns the current user's personal workspace or null if no user is logged in
getPersonalWorkspaceName ( ) : string Returns the name of the currently logged in user's personal workspace (even if that might not exist at that time).
getUserPreference ( string $preference ) : mixed Returns the stored preferences of a user
getUserWorkspace ( ) : Workspace Returns the current user's personal workspace or null if no user is logged in.
getUserWorkspaceName ( ) : string Returns the name of the currently logged in user's personal workspace (even if that might not exist at that time).

Method Details

getBackendUser() public méthode

Returns the current backend user
public getBackendUser ( ) : User
Résultat Neos\Neos\Domain\Model\User

getInterfaceLanguage() public méthode

Returns the interface language the user selected. Will fall back to the default language defined in settings
public getInterfaceLanguage ( ) : string
Résultat string

getPersonalWorkspace() public méthode

Returns the current user's personal workspace or null if no user is logged in
public getPersonalWorkspace ( ) : Workspace
Résultat Neos\ContentRepository\Domain\Model\Workspace

getPersonalWorkspaceName() public méthode

If no user is logged in this method returns null.
public getPersonalWorkspaceName ( ) : string
Résultat string

getUserPreference() public méthode

Returns the stored preferences of a user
public getUserPreference ( string $preference ) : mixed
$preference string
Résultat mixed

getUserWorkspace() public méthode

Deprecated, use getPersonalWorkspace() instead.
Deprecation: 2.1
public getUserWorkspace ( ) : Workspace
Résultat Neos\ContentRepository\Domain\Model\Workspace

getUserWorkspaceName() public méthode

If no user is logged in this method returns null. Deprecated, use getPersonalWorkspaceName() instead.
Deprecation: 2.1
public getUserWorkspaceName ( ) : string
Résultat string

Property Details

$defaultLanguageIdentifier protected_oe property

protected string $defaultLanguageIdentifier
Résultat string

$userDomainService protected_oe property

protected UserService,Neos\Neos\Domain\Service $userDomainService
Résultat Neos\Neos\Domain\Service\UserService

$workspaceRepository protected_oe property

protected WorkspaceRepository,Neos\ContentRepository\Domain\Repository $workspaceRepository
Résultat Neos\ContentRepository\Domain\Repository\WorkspaceRepository