LoginController
Controller responsible for rendering the TYPO3 Backend login form
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Properties
- $context : Context
- $currentRequest : ServerRequestInterface|null
- $eventDispatcher : EventDispatcherInterface
- $features : Features
- $loginProviderIdentifier : string
- the active login provider identifier
- $loginProviderResolver : LoginProviderResolver
- $loginRefresh : bool
- Login-refresh bool; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.
- $moduleTemplate : ModuleTemplate
- $moduleTemplateFactory : ModuleTemplateFactory
- $pageRenderer : PageRenderer
- $redirectToURL : string
- Set to the redirect URL of the form (may be redirect_url or "index.php?M=main")
- $redirectUrl : string
- The URL to redirect to after login.
- $submitValue : string
- Value of forms submit button for login.
- $typo3Information : Typo3Information
- $uriBuilder : UriBuilder
- $view : StandaloneView
Methods
- __construct() : mixed
- formAction() : ResponseInterface
- Injects the request and response objects for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now
- getCurrentRequest() : ServerRequestInterface|null
- getLoginProviderIdentifier() : string
- This can be called by single login providers, they receive an instance of $this
- refreshAction() : ResponseInterface
- Calls the main function but with loginRefresh enabled at any time
- appendLoginProviderCookie() : ResponseInterface
- If a login provider was chosen in the previous request, which is not the default provider, it is stored in a Cookie and appended to the HTTP Response.
- checkRedirect() : void
- Checking, if we should perform some sort of redirection OR closing of windows.
- createLoginLogoutForm() : string
- Main function - creating the login/logout form
- getBackendUserAuthentication() : BackendUserAuthentication
- getLanguageService() : LanguageService
- Returns LanguageService
- getSystemNews() : array<string|int, mixed>
- Gets news from sys_news and converts them into a format suitable for showing them at the login screen.
- init() : void
- Initialize the login box. Will also react on a &L=OUT flag and exit.
- isLoginInProgress() : bool
- Checks if login credentials are currently submitted
- makeInterfaceSelector() : void
- Making interface selector
- provideCustomLoginStyling() : void
- redirectToUrl() : void
- Wrapper method to redirect to configured redirect URL
- renderHtmlViaLoginProvider() : void
Properties
$context
protected
Context
$context
$currentRequest
protected
ServerRequestInterface|null
$currentRequest
= null
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$features
protected
Features
$features
$loginProviderIdentifier
the active login provider identifier
protected
string
$loginProviderIdentifier
= ''
$loginProviderResolver
protected
LoginProviderResolver
$loginProviderResolver
$loginRefresh
Login-refresh bool; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.
protected
bool
$loginRefresh
$moduleTemplate
protected
ModuleTemplate
$moduleTemplate
$moduleTemplateFactory
protected
ModuleTemplateFactory
$moduleTemplateFactory
$pageRenderer
protected
PageRenderer
$pageRenderer
$redirectToURL
Set to the redirect URL of the form (may be redirect_url or "index.php?M=main")
protected
string
$redirectToURL
$redirectUrl
The URL to redirect to after login.
protected
string
$redirectUrl
$submitValue
Value of forms submit button for login.
protected
string
$submitValue
$typo3Information
protected
Typo3Information
$typo3Information
$uriBuilder
protected
UriBuilder
$uriBuilder
$view
protected
StandaloneView
$view
Methods
__construct()
public
__construct(Typo3Information $typo3Information, EventDispatcherInterface $eventDispatcher, PageRenderer $pageRenderer, UriBuilder $uriBuilder, Features $features, Context $context, ModuleTemplateFactory $moduleTemplateFactory, LoginProviderResolver $loginProviderResolver) : mixed
Parameters
- $typo3Information : Typo3Information
- $eventDispatcher : EventDispatcherInterface
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $features : Features
- $context : Context
- $moduleTemplateFactory : ModuleTemplateFactory
- $loginProviderResolver : LoginProviderResolver
formAction()
Injects the request and response objects for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now
public
formAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
the current request
Return values
ResponseInterface —the finished response with the content
getCurrentRequest()
public
getCurrentRequest() : ServerRequestInterface|null
Return values
ServerRequestInterface|nullgetLoginProviderIdentifier()
This can be called by single login providers, they receive an instance of $this
public
getLoginProviderIdentifier() : string
Return values
stringrefreshAction()
Calls the main function but with loginRefresh enabled at any time
public
refreshAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
the current request
Return values
ResponseInterface —the finished response with the content
appendLoginProviderCookie()
If a login provider was chosen in the previous request, which is not the default provider, it is stored in a Cookie and appended to the HTTP Response.
protected
appendLoginProviderCookie(NormalizedParams $normalizedParams, ResponseInterface $response) : ResponseInterface
Parameters
- $normalizedParams : NormalizedParams
- $response : ResponseInterface
Return values
ResponseInterfacecheckRedirect()
Checking, if we should perform some sort of redirection OR closing of windows.
protected
checkRedirect(ServerRequestInterface $request) : void
Do a redirect if a user is logged in
Parameters
- $request : ServerRequestInterface
Tags
createLoginLogoutForm()
Main function - creating the login/logout form
protected
createLoginLogoutForm(ServerRequestInterface $request) : string
Parameters
- $request : ServerRequestInterface
Return values
string —$content
getBackendUserAuthentication()
protected
getBackendUserAuthentication() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
Returns LanguageService
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetSystemNews()
Gets news from sys_news and converts them into a format suitable for showing them at the login screen.
protected
getSystemNews() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of login news.
init()
Initialize the login box. Will also react on a &L=OUT flag and exit.
protected
init(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
-
the current request
isLoginInProgress()
Checks if login credentials are currently submitted
protected
isLoginInProgress(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface
Return values
boolmakeInterfaceSelector()
Making interface selector
protected
makeInterfaceSelector(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
provideCustomLoginStyling()
protected
provideCustomLoginStyling() : void
redirectToUrl()
Wrapper method to redirect to configured redirect URL
protected
redirectToUrl() : void
renderHtmlViaLoginProvider()
protected
renderHtmlViaLoginProvider(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface