public function InMemoryStorage::rename in Configuration Provider 8
Renames a configuration object in the storage.
Parameters
string $name: The name of a configuration object to rename.
string $new_name: The new name of a configuration object.
Return value
bool TRUE on success, FALSE otherwise.
Overrides StorageInterface::rename
File
- src/
InMemoryStorage.php, line 95
Class
- InMemoryStorage
- Provides an in memory confituration storage.
Namespace
Drupal\config_providerCode
public function rename($name, $new_name) {
if (!$this
->exists($name)) {
return FALSE;
}
$this->config[$this->collection][$new_name] = $this->config[$this->collection][$name];
unset($this->config[$this->collection][$name]);
return TRUE;
}