public function StorageComparer::addChangelistUpdate

Creates the update changelist.

Return value

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

Overrides StorageComparerInterface::addChangelistUpdate

File

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

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

public function addChangelistUpdate() {
  foreach (array_intersect($this
    ->getSourceNames(), $this
    ->getTargetNames()) as $name) {
    $source_config_data = $this->sourceStorage
      ->read($name);
    $target_config_data = $this->targetStorage
      ->read($name);
    if ($source_config_data !== $target_config_data) {
      $this
        ->addChangeList('update', array(
        $name,
      ));
    }
  }
  return $this;
}