You are here

function cms_content_sync_update_8012 in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x cms_content_sync.install \cms_content_sync_update_8012()
  2. 2.0.x cms_content_sync.install \cms_content_sync_update_8012()

Implements hook_update_N();.

Move site id key_value store.

File

./cms_content_sync.install, line 282
Install file for cms_content_sync.

Code

function cms_content_sync_update_8012(&$sandbox) {
  $site_id = \Drupal::config('cms_content_sync.settings')
    ->get('cms_content_sync_site_id');
  \Drupal::state()
    ->set('cms_content_sync.site_id', $site_id);
  \Drupal::configFactory()
    ->getEditable('cms_content_sync.settings')
    ->clear('cms_content_sync_site_id')
    ->save();
  return 'Move site id to key_value store.';
}