function ToolbarDisableUserToolbarHooks::toolbarAlter

Implements 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.