function protected_submissions_update_8002 in Protected Submissions 8
Swap rejected submissions from configuration item to state api value.
File
- ./
protected_submissions.install, line 54 - Installation functions for protected_submissions module.
Code
function protected_submissions_update_8002() {
$rejected = \Drupal::config('protected_submissions.settings')
->get('protected_submissions.rejected');
if ($rejected) {
\Drupal::state()
->set('protected_submissions.rejected', $rejected);
\Drupal::configFactory()
->getEditable('protected_submissions.settings')
->clear('protected_submissions.rejected')
->save();
}
}