Feature: A frontend icon registry and an icon view helper
Description
EXT: now keeps a registry of its own for the icons a visitor
sees, separate from the icon registry of TYPO3. That registry is built for the
backend: it loads every core icon, the record icons and the flags with it, and
a site could only replace a frontend icon by registering it for the backend as
well.
- Every active extension and site package can ship
Configuration/, in the format ofFrontend Icons. php Configuration/Icons.php. The files are read in the loading order of the packages, and a package loaded later replaces an identifier. - An extension contributes icons from code through the new event
\FGTCLB\, see CollectFrontendIconsEvent. An entry of aAcademic Base\ Event\ Collect Frontend Icons Event Configuration/with the same identifier wins over a contributed icon.Frontend Icons. php - The new view helper
icon, in the namespacehttp://, renders an icon of this registry with the arguments oftypo3. org/ ns/ FGTCLB/ Academic Base/ View Helpers <core:and the same markup. It does not read the icon registry of TYPO3.icon> - An identifier the frontend registry does not know renders the
default-drawing of TYPO3, whichnot- found EXT:registers in its ownacademic_ base Configuration/, so a site package can replace it.Frontend Icons. php - The registry is kept with the system caches, per set of active packages,
and
typo3 cache:builds it. A change to a file takes effect after the system caches are flushed.warmup
return [
'my-sitepackage-download' => [
'provider' => \FGTCLB\AcademicBase\Imaging\IconProvider\CurrentColorSvgIconProvider::class,
'source' => 'EXT:my_sitepackage/Resources/Public/Icons/download.svg',
],
];
<html xmlns:ab="http://typo3.org/ns/FGTCLB/AcademicBase/ViewHelpers"
data-namespace-typo3-fluid="true">
<ab:icon identifier="my-sitepackage-download" alternativeMarkupIdentifier="inline" />
</html>
Impact
Nothing changes for an existing site through this extension alone.
EXT: and EXT: register their frontend icons
in the new registry, and EXT:, EXT:
and EXT: render the shared icon set of this extension (see
Feature: Icon set shared by the extensions), all of them with the new view helper and each
with a Breaking entry in its own changelog. EXT: and
EXT: render the category type icons with it, with an
Important entry each. No frontend template of the academic extensions renders
an icon with
<core: any more. Each changelog entry says what a
site package has to move.
A site package may ship Configuration/ already. It
takes effect for every template that renders an icon with the new view helper.
See Frontend icons.