Skip to content

Commit d7f7581

Browse files
[BUGFIX] Use IconAPI where applicable to fetch Core icons (#451)
This change makes use of the IconViewHelper to fetch icons delivered with TYPO3 via its official API. Where not applicable, the icon configuration is fetched instead to obtain the icon's source path. Fixes: #450
1 parent 9cc89ec commit d7f7581

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Classes/Hook/FrontendEditingInitializationHook.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,10 @@ protected function getPageTreeStructure(): array
468468
}
469469
}
470470

471+
$appsPagetreeRootIcon = $this->iconRegistry->getIconConfigurationByIdentifier('apps-pagetree-root');
471472
return [
472473
'name' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
473-
'icon' => $this->getAbsolutePath('EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-root.svg'),
474+
'icon' => $this->getAbsolutePath($appsPagetreeRootIcon['options']['source']),
474475
'children' => $children
475476
];
476477
}

Resources/Private/Partials/LeftBar.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@
1313
<f:if condition="{pageNewUrl}">
1414
<li>
1515
<button type="#" class="btn t3-frontend-editing__page-new" data-url="{pageNewUrl}">
16-
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-page-new.svg"/>
16+
<core:icon identifier="actions-page-new"/>
1717
</button>
1818
</li>
1919
</f:if>
2020
<f:if condition="{pageEditUrl}">
2121
<li>
2222
<button type="#" class="btn t3-frontend-editing__page-edit" data-url="{pageEditUrl}">
23-
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-page-open.svg"/>
23+
<core:icon identifier="actions-page-open"/>
2424
</button>
2525
</li>
2626
</f:if>
2727
<li>
2828
<button type="button" class="btn search-button">
29-
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-filter.svg"/>
29+
<core:icon identifier="actions-filter"/>
3030
</button>
3131
</li>
3232

3333
<f:if condition="{mounts}">
3434
<li>
3535
<button type="button" class="btn site-root-button">
36-
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-page-domain.svg"/>
36+
<core:icon identifier="apps-pagetree-page-domain"/>
3737
</button>
3838
</li>
3939
</f:if>
4040
<li>
4141
<button type="button" class="btn t3-frontend-editing__page-tree-refresh">
42-
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-refresh.svg"/>
42+
<core:icon identifier="actions-refresh"/>
4343
</button>
4444
</li>
4545
</ul>

0 commit comments

Comments
 (0)