class BackendRedirectionService (View source)

Properties

protected SessionInterface $session
protected NodeDataRepository $nodeDataRepository
protected WorkspaceRepository $workspaceRepository
protected ContextFactoryInterface $contextFactory
protected DomainRepository $domainRepository
protected SiteRepository $siteRepository
protected UserService $userService
protected PersistenceManagerInterface $persistenceManager
protected PropertyMapper $propertyMapper
protected bool $routingValuesAfterLogin

Methods

string
getAfterLoginRedirectionUri(ActionRequest $actionRequest)

Returns a specific URI string to redirect to after the login; or NULL if there is none.

string
getAfterLogoutRedirectionUri(ActionRequest $actionRequest)

Returns a specific URI string to redirect to after the logout; or NULL if there is none.

getLastVisitedNode(string $workspaceName)

No description

createContext(string $workspaceName)

Create a ContentContext to be used for the backend redirects.

void
createWorkspaceAndRootNodeIfNecessary(string $workspaceName)

If the specified workspace or its root node does not exist yet, the workspace and root node will be created.

Details

string getAfterLoginRedirectionUri(ActionRequest $actionRequest)

Returns a specific URI string to redirect to after the login; or NULL if there is none.

Parameters

ActionRequest $actionRequest

Return Value

string

string getAfterLogoutRedirectionUri(ActionRequest $actionRequest)

Returns a specific URI string to redirect to after the logout; or NULL if there is none.

In case of NULL, it's the responsibility of the AuthenticationController where to redirect, most likely to the LoginController's index action.

Parameters

ActionRequest $actionRequest

Return Value

string

A possible redirection URI, if any

protected NodeInterface getLastVisitedNode(string $workspaceName)

No description

Parameters

string $workspaceName

Return Value

NodeInterface

protected ContentContext createContext(string $workspaceName)

Create a ContentContext to be used for the backend redirects.

Parameters

string $workspaceName

Return Value

ContentContext

protected void createWorkspaceAndRootNodeIfNecessary(string $workspaceName)

If the specified workspace or its root node does not exist yet, the workspace and root node will be created.

This method is basically a safeguard for legacy and potentially broken websites where users might not have their own workspace yet. In a normal setup, the Domain User Service is responsible for creating and deleting user workspaces.

Parameters

string $workspaceName

Name of the workspace

Return Value

void