Skip to content

Commit

Permalink
IBX-6997: Introduced user-menu components group (#987)
Browse files Browse the repository at this point in the history
* IBX-6997: Introduced user-menu components group
* Moved Ibexa\AdminUi\Component\Search\GlobalSearchTwigComponent definition to components/layout.yaml
  • Loading branch information
adamwojs authored Nov 16, 2023
1 parent fe91a44 commit 2ee0d26
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/bundle/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ imports:
- { resource: services/forms.yaml }
- { resource: services/strategies.yaml }
- { resource: services/query_types.yaml }
- { resource: services/search.yaml }
- { resource: services/role_form_mappers.yaml }
- { resource: services/fieldtype_form_mappers.yaml }
- { resource: services/action_dispatchers.yaml }
Expand Down
1 change: 1 addition & 0 deletions src/bundle/Resources/config/services/components.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
imports:
- { resource: components/content/edit.yaml }
- { resource: components/content_type/edit.yaml }
- { resource: components/layout.yaml }

services:
_defaults:
Expand Down
18 changes: 18 additions & 0 deletions src/bundle/Resources/config/services/components/layout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
_defaults:
autowire: true
autoconfigure: false
public: false

Ibexa\AdminUi\Component\Search\GlobalSearchTwigComponent:
autowire: true
public: false
tags:
- { name: ibexa.admin_ui.component, group: global-search }

ibexa.admin_ui.component.user_menu:
class: Ibexa\AdminUi\Component\TwigComponent
arguments:
$template: '@@ibexadesign/ui/user_menu.html.twig'
tags:
- { name: ibexa.admin_ui.component, group: user-menu }
6 changes: 0 additions & 6 deletions src/bundle/Resources/config/services/search.yaml

This file was deleted.

5 changes: 1 addition & 4 deletions src/bundle/Resources/views/themes/admin/ui/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@
</div>
<div class="ibexa-main-header__user-menu-column">
{% block user_menu %}
{{ knp_menu_render('ezplatform_admin_ui.menu.user', {
'depth': 1,
'template': '@ibexadesign/ui/menu/user.html.twig'
}) }}
{{ ibexa_render_component_group('user-menu') }}
{% endblock %}
</div>
</header>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ knp_menu_render('ezplatform_admin_ui.menu.user', {
'depth': 1,
'template': '@ibexadesign/ui/menu/user.html.twig'
}) }}

0 comments on commit 2ee0d26

Please sign in to comment.