aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/classes/Config.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/classes/Config.php b/lib/classes/Config.php
index 20eebdc..434c5a9 100644
--- a/lib/classes/Config.php
+++ b/lib/classes/Config.php
@@ -358,6 +358,16 @@ class Config implements ArrayAccess, Countable, IteratorAggregate
}
/**
+ * Resets the configuration to it's default value.
+ *
+ * @return int The number of removed value entries
+ */
+ public function reset(string $field): int
+ {
+ return ConfigValue::deleteBySql('field=?', [$field]);
+ }
+
+ /**
* delete config entry from database
* @param string name of entry
* @throws InvalidArgumentException