You are here

public function ContentStorageComparer::createChangelistbyCollectionAndNames in Content Synchronization 3.0.x

Same name and namespace in other branches
  1. 8.2 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;
}