function PreprocessHooks::navigation
Same name and namespace in other branches
- main core/themes/admin/src/Hook/PreprocessHooks.php \Drupal\admin\Hook\PreprocessHooks::navigation()
Implements hook_preprocess_HOOK() for navigation.
Attributes
#[Hook('preprocess_navigation')]
File
-
core/
themes/ admin/ src/ Hook/ PreprocessHooks.php, line 974
Class
- PreprocessHooks
- Provides preprocess implementations.
Namespace
Drupal\admin\HookCode
public function navigation(array &$variables) : void {
// Get theme configs.
$logo_default = Settings::getInstance()->getDefault('logo.use_default');
$variables['icon_path'] = !$logo_default ? Settings::getInstance()->getDefault('logo.path') : '';
$variables['navigation'] = $this->moduleHandler
->moduleExists('navigation');
$variables['is_backend'] = TRUE;
// Attach the new drupal navigation styles.
$variables['#attached']['library'][] = 'admin/navigation';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.