function 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;
}