function social_tour_reimport_config in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.2 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.3 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.4 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.5 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.6 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.7 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 8.8 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 10.0.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 10.1.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
- 10.2.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
Function that reimports tour configuration.
1 call to social_tour_reimport_config()
- social_tour_update_8001 in modules/
custom/ social_tour/ social_tour.install - Reinstall the tours, because of some textual changes.
File
- modules/
custom/ social_tour/ social_tour.module, line 240 - The Social Tour module.
Code
function social_tour_reimport_config() {
$config_factory = \Drupal::configFactory();
$names = $config_factory
->listAll('tour.tour.social');
// Loop through existing content and throw away.
foreach ($names as $name) {
$config_factory
->getEditable($name)
->delete();
}
// Re-import config.
\Drupal::service('config.installer')
->installDefaultConfig('module', 'social_tour');
}