public function CachedStorage::rename

Implements Drupal\Core\Config\StorageInterface::rename().

Overrides StorageInterface::rename

File

drupal/core/lib/Drupal/Core/Config/CachedStorage.php, line 111
Contains Drupal\Core\Config\CachedStorage.

Class

CachedStorage
Defines the cached storage controller.

Namespace

Drupal\Core\Config

Code

public function rename($name, $new_name) {

  // If the cache was the first to be deleted, another process might start
  // rebuilding the cache before the storage is renamed.
  if ($this->storage
    ->rename($name, $new_name)) {
    $this->cache
      ->delete($name);
    $this->cache
      ->delete($new_name);
    return TRUE;
  }
  return FALSE;
}