ToolbarTestThemeHooks.php
Namespace
Drupal\toolbar_test\HookFile
-
core/
modules/ toolbar/ tests/ modules/ toolbar_test/ src/ Hook/ ToolbarTestThemeHooks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\toolbar_test\Hook;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Hook implementations for toolbar_test.
*/
class ToolbarTestThemeHooks {
/**
* Implements hook_preprocess_HOOK().
*/
public function preprocessMenu(&$variables) : void {
// All the standard hook_theme variables should be populated when the
// Toolbar module is rendering a menu.
foreach ([
'menu_name',
'items',
'attributes',
] as $variable) {
$variables[$variable];
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ToolbarTestThemeHooks | Hook implementations for toolbar_test. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.