Theme
New in version 3.5
Requires TYPO3 v13.4 or later, where the classic backend theme was introduced.
The Theme trigger is used to show the indicators depending on the backend theme (fresh, modern or classic) the backend user has selected.
Note
Trigger\ is unrelated to Backend theme. The trigger reads the user's selected backend theme as a condition; the indicator overrides backend CSS custom properties.
This is mainly useful together with Color Scheme. The backend theme and the color scheme are independent user settings, and they do not treat each other equally: the classic theme renders the topbar with color-, so its header stays dark no matter which color scheme is selected. An image based indicator registered only for the light color scheme would then appear on a dark header for those users.
\KonradMichalik\Typo3EnvironmentIndicator\Configuration\Handler::addIndicator(
triggers: [
new \KonradMichalik\Typo3EnvironmentIndicator\Configuration\Trigger\ApplicationContext('Development*'),
new \KonradMichalik\Typo3EnvironmentIndicator\Configuration\Trigger\ColorScheme('light', 'auto'),
new \KonradMichalik\Typo3EnvironmentIndicator\Configuration\Trigger\Theme('classic')
],
indicators: [
new \KonradMichalik\Typo3EnvironmentIndicator\Configuration\Indicator\Backend\Logo([
// light color scheme, but a dark header — so use the light-on-dark variant
new \KonradMichalik\Typo3EnvironmentIndicator\Image\Modifier\TextModifier([
'text' => 'DEV',
'color' => '#ffffff',
]),
]),
]
);
The configuration supports multiple themes as separate arguments.
Note
Unlike Color Scheme, the given values are not validated against a fixed list. The backend theme is not backed by a core enum, so an unknown theme simply never matches instead of throwing an exception.
Note
A user who never touched the theme switch is on fresh, matching the TYPO3 default.
Note
Switching the theme does not update image based indicators right away — they change with the next full page load, for the same reason described in Color Scheme.
Note
The trigger requires a backend user and therefore never applies in the frontend.