Added config->delete()
parent
d3eda175c1
commit
ce8c168365
|
@ -536,6 +536,19 @@ class DrupalConfig {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset value in this config object.
|
||||
*/
|
||||
public function delete($key) {
|
||||
$parts = explode('.', $key);
|
||||
if (count($parts) == 1) {
|
||||
unset($this->data[$key]);
|
||||
}
|
||||
else {
|
||||
drupal_array_unset_nested_value($this->data, $parts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value in this config object.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue