Skip to content

Commit

Permalink
[BUGFIX] Use IconAPI where applicable to fetch Core icons (#451)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andreaskienast committed Nov 20, 2020
1 parent 9cc89ec commit d7f7581
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Classes/Hook/FrontendEditingInitializationHook.php
Expand Up @@ -468,9 +468,10 @@ protected function getPageTreeStructure(): array
}
}

$appsPagetreeRootIcon = $this->iconRegistry->getIconConfigurationByIdentifier('apps-pagetree-root');
return [
'name' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
'icon' => $this->getAbsolutePath('EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-root.svg'),
'icon' => $this->getAbsolutePath($appsPagetreeRootIcon['options']['source']),
'children' => $children
];
}
Expand Down
10 changes: 5 additions & 5 deletions Resources/Private/Partials/LeftBar.html
Expand Up @@ -13,33 +13,33 @@
<f:if condition="{pageNewUrl}">
<li>
<button type="#" class="btn t3-frontend-editing__page-new" data-url="{pageNewUrl}">
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-page-new.svg"/>
<core:icon identifier="actions-page-new"/>
</button>
</li>
</f:if>
<f:if condition="{pageEditUrl}">
<li>
<button type="#" class="btn t3-frontend-editing__page-edit" data-url="{pageEditUrl}">
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-page-open.svg"/>
<core:icon identifier="actions-page-open"/>
</button>
</li>
</f:if>
<li>
<button type="button" class="btn search-button">
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-filter.svg"/>
<core:icon identifier="actions-filter"/>
</button>
</li>

<f:if condition="{mounts}">
<li>
<button type="button" class="btn site-root-button">
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-page-domain.svg"/>
<core:icon identifier="apps-pagetree-page-domain"/>
</button>
</li>
</f:if>
<li>
<button type="button" class="btn t3-frontend-editing__page-tree-refresh">
<fe:svg source="EXT:core/Resources/Public/Icons/T3Icons/actions/actions-refresh.svg"/>
<core:icon identifier="actions-refresh"/>
</button>
</li>
</ul>
Expand Down

0 comments on commit d7f7581

Please sign in to comment.