File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 4.1.6] - 2023-07-10
8
+ ### Added
9
+ - Add ` HOOK_wienimal_editor_toolbar_manipulators_alter ` hook ([ #23 ] ( https://github.com/wieni/wienimal_editor_toolbar/pull/23 ) )
10
+
7
11
## [ 4.1.5] - 2023-07-10
8
12
### Fixed
9
13
- ** BC** Use AND conjunction in Route Alter ([ #22 ] ( https://github.com/wieni/wienimal_editor_toolbar/pull/22 ) )
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ public function buildMenu(): array
95
95
$ manipulators [] = ['callable ' => 'toolbar_tools_menu_navigation_links ' ];
96
96
}
97
97
98
+ $ this ->moduleHandler ->alter ('wienimal_editor_toolbar_manipulators ' , $ manipulators , $ menuName );
99
+
98
100
$ tree = $ this ->menuTree ->transform ($ tree , $ manipulators );
99
101
100
102
// Finally, build a renderable array from the transformed tree.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * Alter the menu tree manipulators used by the editor toolbar.
5
+ *
6
+ * @see \Drupal\wienimal_editor_toolbar\Service\EditorToolbarMenuBuilder::buildMenu()
7
+ * @param array $manipulators
8
+ * @param string $menuName
9
+ */
10
+ function hook_wienimal_editor_toolbar_manipulators_alter (array &$ manipulators , string $ menuName ): void
11
+ {
12
+ $ manipulators [] = [
13
+ 'callable ' => 'my_module.my_service:hideMenuItems ' ,
14
+ ];
15
+ }
You can’t perform that action at this time.
0 commit comments