Frontend controller¶
The frontend.controller
frontend request attribute provides access to the
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
object.
Example:
$frontendController = $request->getAttribute('frontend.controller');
$rootline = $frontendController->rootLine; // Mind the capital "L"
Attention
In former TYPO3 versions you have to retrieve the
TypoScriptFrontendController
via the global variable
$GLOBALS['TSFE']
. This should be avoided now, instead use the request
attribute.