You are here

public function ContentStorageComparer::createChangelistbyCollectionAndNames in Content Synchronization 8.2

Same name and namespace in other branches
  1. 3.0.x src/Content/ContentStorageComparer.php \Drupal\content_sync\Content\ContentStorageComparer::createChangelistbyCollectionAndNames()

File

src/Content/ContentStorageComparer.php, line 33

Class

ContentStorageComparer
Extends config storage comparer.

Namespace

Drupal\content_sync\Content

Code

public function createChangelistbyCollectionAndNames($collection, $names) {
  $this->changelist[$collection] = $this
    ->getEmptyChangelist();
  if ($this
    ->getAndSortContentDataByCollectionAndNames($collection, $names)) {
    $this
      ->addChangelistCreate($collection);
    $this
      ->addChangelistUpdate($collection);
    $this
      ->addChangelistDelete($collection);

    // Only collections that support configuration entities can have renames.
    if ($collection == StorageInterface::DEFAULT_COLLECTION) {
      $this
        ->addChangelistRename($collection);
    }
  }
  return $this;
}