hook_toolbar() contains two references to toolbar_pre_render(), a function the Toolbar module doesn't implement anymore.

This hook is invoked in toolbar_pre_render().

See also

toolbar_pre_render()

Instead of toolbar_pre_render(), the references should be to Toolbar::preRenderToolbar(), the function that effectively invokes the hook.

Comments

kiamlaluno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +Novice
StatusFileSize
new853 bytes

I verified the core/modules/toolbar/toolbar.api.php didn't contain other references to that function.

naresh_bavaskar’s picture

Assigned: Unassigned » naresh_bavaskar
pandaski’s picture

+++ b/core/modules/toolbar/toolbar.api.php
@@ -34,14 +34,14 @@
- * @see toolbar_pre_render()
+ * @see Drupal\toolbar\Element\Toolbar::preRenderToolbar()

This hook is invoked by Toolbar::preRenderToolbar() - match line 155 toolbar.api.php

avpaderno’s picture

Assigned: naresh_bavaskar » Unassigned
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

alexpott’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed f966ce6eaf to 9.0.x and 403f13dd93 to 8.9.x and 17507cc131 to 8.8.x. Thanks!

Backported to 8.8.x as a docs fix.

diff --git a/core/modules/toolbar/toolbar.api.php b/core/modules/toolbar/toolbar.api.php
index 9166abf952..34be7a8156 100644
--- a/core/modules/toolbar/toolbar.api.php
+++ b/core/modules/toolbar/toolbar.api.php
@@ -41,7 +41,7 @@
  *   'administration', or the short name of the module implementing the hook.
  *   The corresponding value is a render element of type 'toolbar_item'.
  *
- * @see Drupal\toolbar\Element\Toolbar::preRenderToolbar()
+ * @see \Drupal\toolbar\Element\Toolbar::preRenderToolbar()
  * @ingroup toolbar_tabs
  */
 function hook_toolbar() {

Classes in @see need the leading slash or applications like PHPStorm can't link up it up correctly. Fixed on commit.

  • alexpott committed f966ce6 on 9.0.x
    Issue #3106654 by kiamlaluno: hook_toolbar() documentation still makes...

  • alexpott committed 403f13d on 8.9.x
    Issue #3106654 by kiamlaluno: hook_toolbar() documentation still makes...

  • alexpott committed 17507cc on 8.8.x
    Issue #3106654 by kiamlaluno: hook_toolbar() documentation still makes...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.