Favicon
The favicon of the frontend or backend context will be modified regarding the application context and the associated configuration.

Favicon Example
Inhaltsverzeichnis
- local
- depth
-
2
Frontend
For the frontend, the original favicon will either be fetched from the typoscript configuration
page.
(see typoscript reference)
or can be handled by your own fluid template via the Favicon
:
<html xmlns:env="http://typo3.org/ns/KonradMichalik/Typo3EnvironmentIndicator/ViewHelpers"
data-namespace-typo3-fluid="true">
{f:uri.resource(path:'EXT:your_extension/Resources/Public/Favicon/favicon.png') -> env:favicon()}
{env:favicon(favicon:'EXT:your_extension/Resources/Public/Favicon/favicon.png')}
Backend
For the backend, the favicon will be fetched by the extension configuration of
$GLOBALS
.

Favicon Examples
Modifiers
The favicon modification configuration can be found in
$GLOBALS
.
Add a configured favicon modifier to the desired application context (e.g. Testing
) in your ext_
:
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Testing',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\TextModifier::class =>
[
'text' => 'TEST',
'color' => '#f39c12',
'stroke' => [
'color' => '#ffffff',
'width' => 3,
],
]
],
);

The modifiers will be executed one after the other. You can combine them if you want.
Note
If you want to specify the frontend or backend favicon separately, you can add the another parameter for the request context favicon
or favicon
to the config
method.
The following modifier classes are available:
TextModifier
This is the default modifier if no own configuration is set.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\TextModifier::class =>
[
'text' => 'DEV',
'color' => '#bd593a',
'stroke' => [
'color' => '#ffffff',
'width' => 3,
],
]
],
);

Additional optional configuration keys:
font
(string): The font file path for the text. Default is
EXT:
.
- position
(string): The position of the text. Default is bottom
. Possible values are bottom
, top
.
TriangleModifier
Adds a triangle indicator to the favicon.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\TriangleModifier::class =>
[
'color' => '#bd593a',
]
],
);

Additional optional configuration keys:
size
(float): The percentage size of the triangle. Default is0.
.7 position
(string): The position of the triangle. Default isbottom right
. Possible values arebottom left
,
bottom right
, top left
, top right
.
CircleModifier
Adds a circle indicator to the favicon.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\CircleModifier::class =>
[
'color' => '#bd593a',
]
],
);

Additional optional configuration keys:
size
(float): The percentage size of the circle. Default is0.
.4 position
(string): The position of the circle. Default isbottom right
. Possible values arebottom left
,
bottom right
, top left
, top right
.
- padding
(float): The percentage padding of the circle. Default is 0.
.
FrameModifier
Adds a frame around the favicon.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\FrameModifier::class =>
[
'color' => '#bd593a',
]
],
);

Additional optional configuration keys:
border
(float): The border size of the frame. Default isSize 5
.
ReplaceModifier
Replace the original favicon with a custom one regarding the application context.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\ReplaceModifier::class =>
[
'path' => 'EXT:sitepackage/Resources/Public/Icons/favicon.png',
]
],
);

OverlayModifier
Overlay an additional image to the original favicon regarding the application context.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\OverlayModifier::class =>
[
'path' => 'EXT:sitepackage/Resources/Public/Icons/favicon.png',
]
],
);

Additional optional configuration keys:
size
(float): The percentage size of the overlay. Default is0.
.5 position
(string): The position of the overlay. Default isbottom right
. Possible values arebottom left
,
bottom right
, top left
, top right
.
- padding
(float): The percentage padding of the overlay. Default is 0.
.
ColorizeModifier
Overlay an additional image to the original favicon regarding the application context.
Warning
This modifier is only available with "Imagick" image driver.
\KonradMichalik\Typo3EnvironmentIndicator\Utility\ConfigurationUtility::configByContext(
applicationContext: 'Development',
faviconModifierConfiguration: [
\KonradMichalik\Typo3EnvironmentIndicator\Image\ColorizeModifier::class =>
[
'color' => '#039BE5',
]
],
);

Additional optional configuration keys:
opacity
(float): Controls the opacity of the colorization. Default is1
.brightness
(integer): Controls the brightness of the colorization. Possible values are from-100
to100
.contrast
(integer): Controls the contrast of the colorization. Possible values are from-100
to100
.
Note
If you want to modify the image to your own need, implement a custom modifier class and add it to the configuration.