function gin_toolbar_preprocess_menu__toolbar in Gin Toolbar 8
Implements hook_preprocess_menu__toolbar().
File
- ./
gin_toolbar.module, line 130 - gin_toolbar.module
Code
function gin_toolbar_preprocess_menu__toolbar(&$variables) {
// Get theme configs.
/** @var \Drupal\gin\GinSettings $settings */
$settings = \Drupal::classResolver(GinSettings::class);
$logo_path = $settings
->getDefault('icon_path');
$logo_default = $settings
->getDefault('icon_default');
$variables['icon_default'] = $logo_default;
if (!$logo_default) {
$variables['icon_path'] = $logo_path;
}
// Expose Toolbar variant.
$variables['toolbar_variant'] = $settings
->get('classic_toolbar');
}