- Issue created by @svdhout
- Status changed to Closed: works as designed
over 1 year ago 7:27am 31 May 2023 - 🇧🇪Belgium kriboogh
Version 2 is a rewrite of the hook system. You need to convert your individual hooks into 1 using the plugin ids that come with the module now.
See admin_toolbar_content.api.php for syntax.
Available plugins are (found in admin_toolbar_content/src/Plugin/AdminToolbarContent)
- 'content'
- 'categories'
- 'drupal'
- 'menus'
- 'media'
- 'webform'
Within each 'plugin' the items are now all defined with a 'items' key.
Example:
hook_content_type_collections() { return [ 'contacts' => [ 'label' => 'Contacts', 'content-types' => [ 'bin_district', ], ] ]; } hook_vocabularies_collections() { return [ 'cat_a' => [ 'label' => 'Category A', 'vocabularies' => [ 'vocabulary_id_a', 'vocabulary_id_b' ] ] ]; }
Becomes:
hook_admin_toolbar_content_collections() { return [ 'content' => [ 'contacts' => [ 'label' => 'Contacts', 'items' => [ 'bin_district', ], ] ], 'categories' => [ 'cat_a' => [ 'label' => 'Category A', 'items' => [ 'vocabulary_id_a', 'vocabulary_id_b' ] ] ] ]; }