function seeds_toolbar_preprocess_seeds_toolbar_menu in Seeds Toolbar 8
Implements hook_preprocess_hook().
File
- ./
seeds_toolbar.module, line 349 - Contains seeds_toolbar.module.
Code
function seeds_toolbar_preprocess_seeds_toolbar_menu(&$variables) {
global $base_url;
$config = \Drupal::config('seeds_toolbar.settings');
$settings = $config
->get();
if (!empty($settings[$settings['style'] . '_logo'])) {
$variables['logo_link'] = file_url_transform_relative(file_create_url($base_url . '/' . $settings[$settings['style'] . '_logo']));
}
else {
$variables['logo_link'] = file_url_transform_relative(file_create_url($base_url . '/' . drupal_get_path('module', 'seeds_toolbar') . '/assets/icons/logo/drupal.svg'));
}
}