X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fsecurity_review%2Fsrc%2FCheckSettings.php;fp=web%2Fmodules%2Fcontrib%2Fsecurity_review%2Fsrc%2FCheckSettings.php;h=eadda42d1c436daea2df7a8e81861d78d96d435c;hp=0000000000000000000000000000000000000000;hb=ba1b5c55c66590c41ccc9844d3e62391b0399abb;hpb=93ef30d42f68e55d11d97312531118bbcd4cf318 diff --git a/web/modules/contrib/security_review/src/CheckSettings.php b/web/modules/contrib/security_review/src/CheckSettings.php new file mode 100644 index 000000000..eadda42d1 --- /dev/null +++ b/web/modules/contrib/security_review/src/CheckSettings.php @@ -0,0 +1,86 @@ +check = $check; + $this->config = $config; + } + + /** + * {@inheritdoc} + */ + public function get($key, $default_value = NULL) { + $value = $this->config->get('settings.' . $key); + + if ($value == NULL) { + return $default_value; + } + return $value; + } + + /** + * {@inheritdoc} + */ + public function set($key, $value) { + $this->config->set('settings.' . $key, $value); + $this->config->save(); + return $this; + } + + /** + * {@inheritdoc} + */ + public function buildForm() { + return []; + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, array $values) { + // Validation is optional. + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, array $values) { + // Handle submission. + } + +}