function ToolbarDisableUserToolbarHooks::toolbarAlter

Same name and namespace in other branches
  1. 11.x core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php \Drupal\toolbar_disable_user_toolbar\Hook\ToolbarDisableUserToolbarHooks::toolbarAlter()

Implements hook_toolbar_alter().

Attributes

#[Hook('toolbar_alter')]

File

core/modules/toolbar/tests/modules/toolbar_disable_user_toolbar/src/Hook/ToolbarDisableUserToolbarHooks.php, line 17

Class

ToolbarDisableUserToolbarHooks
Hook implementations for toolbar_disable_user_toolbar.

Namespace

Drupal\toolbar_disable_user_toolbar\Hook

Code

public function toolbarAlter(&$items) : void {
  unset($items['user']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.