Deprecation: #97544 - Preview URI Generation related functionality in BackendUtility 

See forge#97544

Description 

With forge#91123 the PreviewUriBuilder has been introduced. To further streamline any preview URI generation code, the related functionality has now been fully integrated into PreviewUriBuilder along with two new PSR-14 events. Therefore, the previously used BackendUtility::getPreviewUrl() method, as well as the related hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass'] , has been deprecated.

Impact 

Using the utility method or registering hooks will trigger a PHP E_USER_DEPRECATED error. The extension scanner will detect usages.

Affected installations 

All installations using the utility method or the hook in custom extensions.

Migration 

Migrate any usage of BackendUtility::getPreviewUrl() to PreviewUriBuilder->buildUri() .

Replace any $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass'] hook by using the new PSR-14 events. The BeforePagePreviewUriGeneratedEvent can be used as replacement for the hooks' preProcess() method, while the AfterPagePreviewUriGeneratedEvent can be used as replacement for the hooks' postProcess() method.