Skip to content
Snippets Groups Projects

Resolve #3483599 "Conversion9"

Open nicxvan requested to merge issue/drupal-3483599:3483599-conversion9 into 11.x
1 unresolved thread

Closes #3483599

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
68 ],
69 '#weight' => 3399,
70 ];
71 // \Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem adds an
72 // #attributes property to each toolbar item's tab child automatically.
73 // Lazy builders don't support an #attributes property so we need to
74 // add another render callback to remove the #attributes property. We start by
75 // adding the defaults, and then we append our own pre render callback.
76 $items['announcement'] += \Drupal::service('plugin.manager.element_info')->getInfo('toolbar_item');
77 $items['announcement']['#pre_render'][] = [RenderCallbacks::class, 'removeTabAttributes'];
78 return $items;
79 }
80
81 /**
82 * Implements hook_toolbar_alter().
83 */
  • Comment on lines +81 to +83

    What about the docblock? It looks like a relic from procedural hooks. Should we change to something like:

    Implements toolbar_alter hook.

    ...or something similar?

    I think this is a good moment to resolve also this. But probably we copy the block from the legacy procedural implementation?

  • Please register or sign in to reply
Please register or sign in to reply
Loading