function StorageComparer::addChangelistCreate

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistCreate()
  2. 10 core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistCreate()
  3. 11.x core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::addChangelistCreate()

Creates the create changelist.

The list of creates is sorted so that dependencies are created before configuration entities that depend on them. For example, field storages should be created before fields.

Parameters

string $collection: The storage collection to operate on.

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

File

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

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

protected function addChangelistCreate($collection) {
    $creates = array_diff($this->sourceNames[$collection], $this->targetNames[$collection]);
    $this->addChangeList($collection, 'create', $creates);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.