function entity_share_cron_update_8201 in Entity Share Cron 8.2
Same name and namespace in other branches
- 3.0.x entity_share_cron.install \entity_share_cron_update_8201()
Switch existing configuration from config to state..
File
- ./
entity_share_cron.install, line 45
Code
function entity_share_cron_update_8201() {
$config = \Drupal::configFactory()
->getEditable('entity_share_cron.settings');
$state = \Drupal::state();
$old_last_run = $config
->get('cron_last_run');
$state
->set('entity_share_cron.cron_last_run', $old_last_run);
$config
->clear('cron_last_run')
->save();
}