function ThemeSettings::import
Same name in other branches
- 9 core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\destination\d7\ThemeSettings::import()
- 8.9.x core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\destination\d7\ThemeSettings::import()
- 11.x core/modules/system/src/Plugin/migrate/destination/d7/ThemeSettings.php \Drupal\system\Plugin\migrate\destination\d7\ThemeSettings::import()
Overrides MigrateDestinationInterface::import
File
-
core/
modules/ system/ src/ Plugin/ migrate/ destination/ d7/ ThemeSettings.php, line 61
Class
- ThemeSettings
- Persist theme settings to the config system.
Namespace
Drupal\system\Plugin\migrate\destination\d7Code
public function import(Row $row, array $old_destination_id_values = []) {
$imported = FALSE;
$config = $this->configFactory
->getEditable($row->getDestinationProperty('configuration_name'));
$theme_settings = $row->getDestination();
// Remove keys not in theme settings.
unset($theme_settings['configuration_name']);
unset($theme_settings['theme_name']);
unset($theme_settings['legacy_theme_name']);
if (isset($theme_settings)) {
theme_settings_convert_to_config($theme_settings, $config);
$config->save();
$imported = TRUE;
}
return $imported;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.