public function ConfigSplitManager::singleExportPreview in Configuration Split 2.0.x
Get the single export preview.
Parameters
\Drupal\Core\Config\ImmutableConfig $split: The split config.
Return value
\Drupal\Core\Config\StorageInterface The single export preview.
File
- src/
ConfigSplitManager.php, line 543
Class
- ConfigSplitManager
- The manager to split and merge.
Namespace
Drupal\config_splitCode
public function singleExportPreview(ImmutableConfig $split) : StorageInterface {
// Force the transformation.
$this->export
->listAll();
$preview = $this
->getPreviewStorage($split, $this->export);
if (!$split
->get('status') && $preview !== NULL) {
// @todo decide if splitting an inactive split is wise.
$transforming = new MemoryStorage();
self::replaceStorageContents($this->export, $transforming);
$this
->splitPreview($split, $transforming, $preview);
}
if ($preview === NULL) {
throw new \RuntimeException();
}
return $preview;
}