You are here

public function ConfigSplitManager::importTransform in Configuration Split 2.0.x

Process the import of a split.

Parameters

string $name: The name of the split.

\Drupal\Core\Config\StorageTransformEvent $event: The transformation event.

File

src/ConfigSplitManager.php, line 196

Class

ConfigSplitManager
The manager to split and merge.

Namespace

Drupal\config_split

Code

public function importTransform(string $name, StorageTransformEvent $event) : void {
  $split = $this
    ->getSplitConfig($name);
  if ($split === NULL) {
    return;
  }
  if (!$split
    ->get('status')) {
    return;
  }
  $storage = $event
    ->getStorage();
  $secondary = $this
    ->getSplitStorage($split, $storage);
  if ($secondary !== NULL) {
    $this
      ->mergeSplit($split, $storage, $secondary);
  }
}