function StorageReplaceDataWrapper::deleteAll
Same name in other branches
- 9 core/modules/config/src/StorageReplaceDataWrapper.php \Drupal\config\StorageReplaceDataWrapper::deleteAll()
- 10 core/modules/config/src/StorageReplaceDataWrapper.php \Drupal\config\StorageReplaceDataWrapper::deleteAll()
- 11.x core/modules/config/src/StorageReplaceDataWrapper.php \Drupal\config\StorageReplaceDataWrapper::deleteAll()
Overrides StorageInterface::deleteAll
File
-
core/
modules/ config/ src/ StorageReplaceDataWrapper.php, line 150
Class
- StorageReplaceDataWrapper
- Wraps a configuration storage to allow replacing specific configuration data.
Namespace
Drupal\configCode
public function deleteAll($prefix = '') {
if ($prefix === '') {
$this->replacementData[$this->collection] = [];
}
else {
foreach (array_keys($this->replacementData[$this->collection]) as $name) {
if (strpos($name, $prefix) === 0) {
unset($this->replacementData[$this->collection][$name]);
}
}
}
return $this->storage
->deleteAll($prefix);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.