public function StorageComparer::moveRenameToUpdate

public StorageComparer::moveRenameToUpdate($rename, $collection = StorageInterface::DEFAULT_COLLECTION)

Moves a rename operation to an update.

Parameters

string $rename: The rename name, as provided by ConfigImporter::createRenameName().

string $collection: (optional) The collection where the configuration is stored. Defaults to the default collection.

Overrides StorageComparerInterface::moveRenameToUpdate

See also

\Drupal\Core\Config\ConfigImporter::createRenameName()

File

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

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

public function moveRenameToUpdate($rename, $collection = StorageInterface::DEFAULT_COLLECTION) {
  $names = $this->extractRenameNames($rename);
  $this->removeFromChangelist($collection, 'rename', $rename);
  $this->addChangeList($collection, 'update', array($names['new_name']), $this->sourceNames[$collection]);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!StorageComparer.php/function/StorageComparer::moveRenameToUpdate/8.1.x