public function ContentSyncSettings::resetSiteId in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 src/Controller/ContentSyncSettings.php \Drupal\cms_content_sync\Controller\ContentSyncSettings::resetSiteId()
- 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 454
Class
- ContentSyncSettings
- Class ContentSyncSettings.
Namespace
Drupal\cms_content_sync\ControllerCode
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;
}