function MemoryStorage::delete
Deletes a configuration object from the storage.
Parameters
string $name: The name of a configuration object to delete.
Return value
bool TRUE on success, FALSE otherwise.
Overrides StorageInterface::delete
File
-
core/
lib/ Drupal/ Core/ Config/ MemoryStorage.php, line 73
Class
- MemoryStorage
- Provides an in memory configuration storage.
Namespace
Drupal\Core\ConfigCode
public function delete($name) {
if (isset($this->config[$this->collection][$name])) {
unset($this->config[$this->collection][$name]);
// Remove the collection if it is empty.
if (empty($this->config[$this->collection])) {
$this->config
->offsetUnset($this->collection);
}
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.