Skip to content

Commit

Permalink
[TASK] Unify icon identifiers (TYPO3-Documentation#3898)
Browse files Browse the repository at this point in the history
.. so that it is clear that no magic is going on with prefixes.

Resolves: TYPO3-Documentation#3897
  • Loading branch information
cweiske authored Jan 18, 2024
1 parent 48522d8 commit 07d0edf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Documentation/ApiOverview/Icon/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ to render an icon in your view:
.. code-block:: html

{namespace core = TYPO3\CMS\Core\ViewHelpers}
<core:icon identifier="my-icon-identifier" size="small" />
<core:icon identifier="tx-myext-svgicon" size="small" />

This will render the desired icon using an :html:`img` tag. If you prefer having
the SVG inlined into your HTML (for example, for being able to change colors
Expand All @@ -130,7 +130,7 @@ its surrounding element if you use this option.

{namespace core = TYPO3\CMS\Core\ViewHelpers}
<core:icon
identifier="my-icon-identifier"
identifier="tx-myext-svgicon"
size="small"
alternativeMarkupIdentifier="inline"
/>
Expand Down
6 changes: 3 additions & 3 deletions Documentation/ApiOverview/Icon/_Icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@

return [
// Icon identifier
'mysvgicon' => [
'tx-myext-svgicon' => [
// Icon provider class
'provider' => SvgIconProvider::class,
// The source SVG for the SvgIconProvider
'source' => 'EXT:my_extension/Resources/Public/Icons/mysvg.svg',
],
'mybitmapicon' => [
'tx-myext-bitmapicon' => [
'provider' => BitmapIconProvider::class,
// The source bitmap file
'source' => 'EXT:my_extension/Resources/Public/Icons/mybitmap.png',
// All icon providers provide the possibility to register an icon that spins
'spinning' => true,
],
'anothersvgicon' => [
'tx-myext-anothersvgicon' => [
'provider' => SvgIconProvider::class,
'source' => 'EXT:my_extension/Resources/Public/Icons/anothersvg.svg',
// Since TYPO3 v12.0 an extension that provides icons for broader
Expand Down

0 comments on commit 07d0edf

Please sign in to comment.