function simplelogin_preprocess_simplelogin in SimpleLogin 8.6
1 string reference to 'simplelogin_preprocess_simplelogin'
- simplelogin_theme_registry_alter in ./
simplelogin.module - Implements hook_theme_registry_alter
File
- ./
simplelogin.module, line 105 - The module file for simplelogin pages module.
Code
function simplelogin_preprocess_simplelogin(&$variables) {
$path = \Drupal::service('path.current')
->getPath();
$module_path = drupal_get_path('module', 'simplelogin');
$variables['#attached']['library'][] = 'simplelogin/simplelogin-library';
// Able to use custom variables
$variables['path'] = $path;
$variables['base_path'] = base_path();
$variables['logo'] = file_url_transform_relative(file_create_url(theme_get_setting('logo.url')));
$variables['background_class'] = simple_login_settings('active');
$variables['background_opacity'] = simple_login_settings('opacity');
$variables['wrapper_width'] = simple_login_settings('width');
$variables['site_name'] = \Drupal::config('system.site')
->get('name');
$variables['site_register'] = \Drupal::config('user.settings')
->get('register');
}