You are here

function site_settings_preprocess in Site Settings and Labels 8

Implements hook_preprocess().

File

./site_settings.module, line 63
Contains site_settings.module..

Code

function site_settings_preprocess(&$variables) {

  // Get template key. We give the admin control over this in case it conflicts
  // with a particular module.
  $config = \Drupal::config('site_settings.config');
  $template_key = $config
    ->get('template_key');

  // Load the site settings into the specified key.
  $site_settings = \Drupal::service('site_settings.loader');
  $variables[$template_key] = $site_settings
    ->loadAll();
}