Skip to content

Commit

Permalink
IBX-7808: Added possibility to define icons for content type group
Browse files Browse the repository at this point in the history
  • Loading branch information
mikadamczyk committed Apr 4, 2024
1 parent 06b22fe commit ae01d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/bundle/Resources/config/default_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ parameters:
ibexa.site_access.config.default.content_type_group.default-config:
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#file'
ibexa.site_access.config.default.content_type_group.content:
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#article'
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#content-type-content'
ibexa.site_access.config.default.content_type_group.users:
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#user_group'
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#user-type'
ibexa.site_access.config.default.content_type_group.media:
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#gallery'
thumbnail: '/bundles/ibexaadminui/img/ibexa-icons.svg#media-type'

ibexa.content_view.tabs.default_template: '@@ibexadesign/ui/tab/default.html.twig'

Expand Down
5 changes: 4 additions & 1 deletion src/lib/UI/Service/IconResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ private function resolveIcon(string $format, string $identifier): string
$config = $this->configResolver->getParameter($parameterName);
}

if ((empty($config) || empty($config[static::ICON_KEY])) && $this->configResolver->hasParameter($defaultParameterName)) {
if (
(empty($config) || empty($config[static::ICON_KEY]))
&& $this->configResolver->hasParameter($defaultParameterName)
) {
$config = $this->configResolver->getParameter($defaultParameterName);
}

Expand Down

0 comments on commit ae01d8c

Please sign in to comment.