You are here

public function ContentSyncSettings::setPreviewEnabled 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::setPreviewEnabled()
  2. 2.0.x src/Controller/ContentSyncSettings.php \Drupal\cms_content_sync\Controller\ContentSyncSettings::setPreviewEnabled()

Parameters

bool $set:

File

src/Controller/ContentSyncSettings.php, line 151

Class

ContentSyncSettings
Class ContentSyncSettings.

Namespace

Drupal\cms_content_sync\Controller

Code

public function setPreviewEnabled($set) {
  $this->configFactory
    ->getEditable('cms_content_sync.settings')
    ->set('cms_content_sync_enable_preview', $set)
    ->save();
  $this->isPreviewEnabled = $set;
}