function StorageComparer::addChangelistDelete
Same name in other branches
- 9 core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistDelete()
- 8.9.x core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistDelete()
- 11.x 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 - Calculates the differences.
File
-
core/
lib/ Drupal/ Core/ Config/ StorageComparer.php, line 266
Class
- StorageComparer
- Defines a config storage comparer.
Namespace
Drupal\Core\ConfigCode
protected function addChangelistDelete($collection) {
$deletes = array_diff(array_reverse($this->targetNames[$collection]), $this->sourceNames[$collection]);
$this->addChangeList($collection, 'delete', $deletes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.