‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\Http\UrlHandlerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Frontend\Http\UrlHandlerInterface:
TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler

Public Member Functions

bool canHandleCurrentUrl ()
 
 handle ()
 

Detailed Description

This interface needs to be implemented by all classes that register for the hook in: $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']

It can be used to do custom URL processing during a Frontend request.

Deprecated:
‪since TYPO3 v9.3, will be removed in TYPO3 v10.0 in favor of PSR-15 middlewares.

Definition at line 24 of file UrlHandlerInterface.php.

Member Function Documentation

◆ canHandleCurrentUrl()

bool TYPO3\CMS\Frontend\Http\UrlHandlerInterface::canHandleCurrentUrl ( )

Return TRUE if this hook handles the current URL. Warning! If TRUE is returned content rendering will be disabled! This method will be called in the constructor of the TypoScriptFrontendController

See also
‪\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct()
‪\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeRedirectUrlHandlers()
Returns
‪bool

Implemented in TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler.

◆ handle()

TYPO3\CMS\Frontend\Http\UrlHandlerInterface::handle ( )

Custom processing of the current URL.

If canHandle() has returned TRUE this method needs to take care of redirecting the user or generating custom output. This hook will be called BEFORE the user is redirected to an external URL configured in the page properties.

See also
‪\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::redirectToExternalUrl()

Implemented in TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler.