class UserInterfaceModeService (View source)

Service to build and find UserInterfaceMode objects

Properties

protected PrivilegeManagerInterface $privilegeManager
protected UserService $userService
protected array $editPreviewModes
protected string $defaultEditPreviewMode

Methods

findModeByCurrentUser()

Get the current rendering mode (editPreviewMode).

findDefaultMode()

Returns the default rendering mode.

findModeByName(string $modeName)

Finds an rendering mode by name.

Details

UserInterfaceMode findModeByCurrentUser()

Get the current rendering mode (editPreviewMode).

Will return a live mode when not in backend.

Return Value

UserInterfaceMode

UserInterfaceMode findDefaultMode()

Returns the default rendering mode.

Return Value

UserInterfaceMode

UserInterfaceMode findModeByName(string $modeName)

Finds an rendering mode by name.

Parameters

string $modeName

Return Value

UserInterfaceMode

Exceptions

Exception