Deprecation: #100405 - Property TypoScriptFrontendController->type¶
The public property
type of the main class in TYPO3 frontend
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController has been
marked as internal, as it should not be used outside of this PHP class anymore
in the future.
This is part of the overall part to reduce dependencies on this PHP class, as it is not always available in TYPO3 frontend.
Accessing this property will trigger a PHP deprecation notice. Accessing this property might also happen via TypoScript and TypoScript conditions.
TYPO3 installations using this property on checking various typeNum settings from TypoScript.
When using this property in PHP code via
$GLOBALS['TSFE']->type, it is
recommended to move to the PSR-7 request via
$request->getAttribute('routing')->getPageType(), which is the property
PageArguments object, as a result of the
the request object is not available.
Within TypoScript, conditions and getData properties need to be adapted:
# Before [getTSFE() && getTSFE().type == 13] # After [request.getPageArguments()?.getPageType() == 13]
In TypoScript getData attributes:
# Before page.10.data = TSFE:type # After page.10.data = request:routing|pageType