function social_theme_setup in Open Social 8
Same name and namespace in other branches
- 8.2 social.profile \social_theme_setup()
- 8.3 social.profile \social_theme_setup()
- 8.4 social.profile \social_theme_setup()
- 8.5 social.profile \social_theme_setup()
- 8.6 social.profile \social_theme_setup()
- 8.7 social.profile \social_theme_setup()
Install the theme.
Parameters
array $install_state: The install state.
File
- ./
social.profile, line 335 - Enables modules and site configuration for a social site installation.
Code
function social_theme_setup(array &$install_state) {
// Clear all status messages generated by modules installed in previous step.
drupal_get_messages('status', TRUE);
// Also install improved theme settings & color module, because it improves
// the social blue theme settings page.
$modules = [
'color',
];
\Drupal::service('module_installer')
->install($modules);
$themes = [
'socialblue',
];
\Drupal::service('theme_handler')
->install($themes);
\Drupal::configFactory()
->getEditable('system.theme')
->set('default', 'socialblue')
->save();
// Ensure that the install profile's theme is used.
// @see _drupal_maintenance_theme()
\Drupal::service('theme.manager')
->resetActiveTheme();
$modules = [
'improved_theme_settings',
];
\Drupal::service('module_installer')
->install($modules);
}