You are here

public function ConfigPatchMerge::createPatch in Configuration Split 2.0.x

Create a patch object given two arrays.

Parameters

array $original: The original data.

array $new: The new data.

Return value

\Drupal\config_split\Config\ConfigPatch The patch object.

File

src/Config/ConfigPatchMerge.php, line 45

Class

ConfigPatchMerge
The patch merging service.

Namespace

Drupal\config_split\Config

Code

public function createPatch(array $original, array $new) : ConfigPatch {
  return ConfigPatch::fromArray([
    'added' => DiffArray::diffAssocRecursive($new, $original),
    'removed' => DiffArray::diffAssocRecursive($original, $new),
  ]);
}