function entity_share_cron_update_8201 in Entity Share Cron 3.0.x
Same name and namespace in other branches
- 8.2 entity_share_cron.install \entity_share_cron_update_8201()
Switch existing configuration from config to state..
File
- ./
entity_share_cron.install, line 56
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(CronHookHandler::STATE_ID, $old_last_run);
$config
->clear('cron_last_run')
->save();
}