function node_title_validation_update_8001 in Node Title Validation 2.0.x
Same name and namespace in other branches
- 8 node_title_validation.install \node_title_validation_update_8001()
- 1.0.x node_title_validation.install \node_title_validation_update_8001()
Converts node_title_validation_config config entity to node_title_validation.
File
- ./
node_title_validation.install, line 11 - Node title validation install.
Code
function node_title_validation_update_8001() {
$old_config = \Drupal::configFactory()
->getEditable('node_title_validation_config.node_title_validation_settings');
$new_config = \Drupal::configFactory()
->getEditable('node_title_validation.node_title_validation_settings');
$new_config
->set('node_title_validation_config', $old_config
->get('node_title_validation_config'));
$new_config
->save();
$old_config
->delete();
}