public function StorageComparer::addChangeList

Adds changes to the changelist.

Parameters

string $op: The change operation performed. Either delete, create or update.

array $changes: Array of changes to add the changelist.

Return value

\Drupal\Core\Config\StorageComparerInterface An object which implements the StorageComparerInterface.

Overrides StorageComparerInterface::addChangeList

3 calls to StorageComparer::addChangeList()
StorageComparer::addChangelistCreate in drupal/core/lib/Drupal/Core/Config/StorageComparer.php
Creates the create changelist.
StorageComparer::addChangelistDelete in drupal/core/lib/Drupal/Core/Config/StorageComparer.php
Creates the delete changelist.
StorageComparer::addChangelistUpdate in drupal/core/lib/Drupal/Core/Config/StorageComparer.php
Creates the update changelist.

File

drupal/core/lib/Drupal/Core/Config/StorageComparer.php, line 106
Contains \Drupal\Core\Config\StorageComparer.

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

public function addChangeList($op, array $changes) {

  // Only add changes that aren't already listed.
  $changes = array_diff($changes, $this->changelist[$op]);
  $this->changelist[$op] = array_merge($this->changelist[$op], $changes);
  return $this;
}