summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Crosby <creecros@gmail.com>2018-12-01 15:00:18 -0500
committerfguillot <fred@kanboard.net>2018-12-01 12:00:18 -0800
commitabb0456641f12a2cea458bb3e4477d1beb9ef53e (patch)
tree61a9cb54094c2d9ff60ddc2e653ac41b4e18164e
parentcddaf2ac2ec541b695a7dcc2f7410322950c5eef (diff)
Add remove() to Settings Model
-rw-r--r--app/Model/SettingModel.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/Model/SettingModel.php b/app/Model/SettingModel.php
index 5b2ee54f..e3cd4f96 100644
--- a/app/Model/SettingModel.php
+++ b/app/Model/SettingModel.php
@@ -110,4 +110,18 @@ abstract class SettingModel extends Base
return ! in_array(false, $results, true);
}
+
+ /**
+ * Remove a setting
+ *
+ * @access public
+ * @param string $option
+ * @return bool
+ */
+ public function remove($option)
+ {
+ return $this->db->table(self::TABLE)
+ ->eq('option', $option)
+ ->remove();
+ }
}