You are here

function social_tour_reimport_config in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  2. 8 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  3. 8.2 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  4. 8.3 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  5. 8.4 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  6. 8.5 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  7. 8.6 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  8. 8.7 modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  9. 10.3.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  10. 10.0.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  11. 10.1.x modules/custom/social_tour/social_tour.module \social_tour_reimport_config()
  12. 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');
}