You are here

protected function StorageComparer::addChangelistDelete in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistDelete()

Creates the delete changelist.

The list of deletes is sorted so that dependencies are deleted after configuration entities that depend on them. For example, fields should be deleted after field storages.

Parameters

string $collection: The storage collection to operate on.

1 call to StorageComparer::addChangelistDelete()
StorageComparer::createChangelist in core/lib/Drupal/Core/Config/StorageComparer.php

File

core/lib/Drupal/Core/Config/StorageComparer.php, line 216

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

protected function addChangelistDelete($collection) {
  $deletes = array_diff(array_reverse($this->targetNames[$collection]), $this->sourceNames[$collection]);
  $this
    ->addChangeList($collection, 'delete', $deletes);
}