Feature: #102255 - Option to skip URL processing in AssetRenderer

See forge#102255

Description

The \TYPO3\CMS\Core\Page\AssetCollector options have been extended to include an external flag. When set for asset files using $assetCollector->addStyleSheet() or $assetCollector->addJavaScript(), all processing of the asset URI (like the addition of the cache busting parameter) is skipped and the input path will be used as-is in the resulting HTML tag.

Example

The following code skips the cache busting parameter ?1726090820 for the supplied CSS file:

$assetCollector->addStyleSheet(
    'myCssFile',
    PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName('EXT:my_extension/Resources/Public/MyFile.css')),
    [],
    ['external' => true]
);
Copied!

Resulting in the following HTML output:

<link rel="stylesheet" href="/_assets/<hash>/myFile.css" />
Copied!

Impact

Developers can now use the AssetCollector API to embed JavaScript or CSS files without any processing of the supplied asset URI.