You are here

public function ContentSyncSettings::resetSiteId in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Controller/ContentSyncSettings.php \Drupal\cms_content_sync\Controller\ContentSyncSettings::resetSiteId()
  2. 2.0.x src/Controller/ContentSyncSettings.php \Drupal\cms_content_sync\Controller\ContentSyncSettings::resetSiteId()

Remove the site ID setting from the current site's state, requesting a new one during the next config export.

File

src/Controller/ContentSyncSettings.php, line 388

Class

ContentSyncSettings
Class ContentSyncSettings.

Namespace

Drupal\cms_content_sync\Controller

Code

public function resetSiteId() {

  // Reset site ID.
  \Drupal::state()
    ->delete('cms_content_sync.site_id');

  // Reset so it's computed again.
  $this->siteId = null;

  // Reset machine name.
  \Drupal::state()
    ->delete('cms_content_sync.site_machine_name');

  // Reset so it's computed again.
  $this->siteMachineName = null;
}