PHP Class Neos\Neos\Service\BackendRedirectionService

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$domainRepository Neos\Neos\Domain\Repository\DomainRepository
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$propertyMapper Neos\Flow\Property\PropertyMapper
$session Neos\Flow\Session\SessionInterface
$siteRepository Neos\Neos\Domain\Repository\SiteRepository
$userService UserService
$workspaceRepository Neos\ContentRepository\Domain\Repository\WorkspaceRepository

Public Methods

Method Description
getAfterLoginRedirectionUri ( ActionRequest $actionRequest ) : string Returns a specific URI string to redirect to after the login; or NULL if there is none.
getAfterLogoutRedirectionUri ( ActionRequest $actionRequest ) : string Returns a specific URI string to redirect to after the logout; or NULL if there is none.

Protected Methods

Method Description
createContext ( string $workspaceName ) : ContentContext Create a ContentContext to be used for the backend redirects.
createWorkspaceAndRootNodeIfNecessary ( string $workspaceName ) : void If the specified workspace or its root node does not exist yet, the workspace and root node will be created.
getLastVisitedNode ( string $workspaceName ) : Neos\ContentRepository\Domain\Model\NodeInterface

Method Details

createContext() protected method

Create a ContentContext to be used for the backend redirects.
protected createContext ( string $workspaceName ) : ContentContext
$workspaceName string
return Neos\Neos\Domain\Service\ContentContext

createWorkspaceAndRootNodeIfNecessary() protected method

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.
protected createWorkspaceAndRootNodeIfNecessary ( string $workspaceName ) : void
$workspaceName string Name of the workspace
return void

getAfterLoginRedirectionUri() public method

Returns a specific URI string to redirect to after the login; or NULL if there is none.
public getAfterLoginRedirectionUri ( ActionRequest $actionRequest ) : string
$actionRequest Neos\Flow\Mvc\ActionRequest
return string

getAfterLogoutRedirectionUri() public method

In case of NULL, it's the responsibility of the AuthenticationController where to redirect, most likely to the LoginController's index action.
public getAfterLogoutRedirectionUri ( ActionRequest $actionRequest ) : string
$actionRequest Neos\Flow\Mvc\ActionRequest
return string A possible redirection URI, if any

getLastVisitedNode() protected method

protected getLastVisitedNode ( string $workspaceName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$workspaceName string
return Neos\ContentRepository\Domain\Model\NodeInterface

Property Details

$contextFactory protected property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
return Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$domainRepository protected property

protected DomainRepository,Neos\Neos\Domain\Repository $domainRepository
return Neos\Neos\Domain\Repository\DomainRepository

$nodeDataRepository protected property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
return Neos\ContentRepository\Domain\Repository\NodeDataRepository

$persistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$propertyMapper protected property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
return Neos\Flow\Property\PropertyMapper

$session protected property

protected SessionInterface,Neos\Flow\Session $session
return Neos\Flow\Session\SessionInterface

$siteRepository protected property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
return Neos\Neos\Domain\Repository\SiteRepository

$userService protected property

protected UserService,Neos\Neos\Service $userService
return UserService

$workspaceRepository protected property

protected WorkspaceRepository,Neos\ContentRepository\Domain\Repository $workspaceRepository
return Neos\ContentRepository\Domain\Repository\WorkspaceRepository