Including security review as a submodule - with patched for Yaffs.
[yaffs-website] / web / modules / contrib / security_review / src / CheckSettingsInterface.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\security_review\CheckSettingsInterface.
6  */
7
8 namespace Drupal\security_review;
9
10 /**
11  * Interface for check-specific settings and forms for altering them.
12  */
13 interface CheckSettingsInterface {
14
15   /**
16    * Gets a check-specific setting value identified by $key.
17    *
18    * @param string $key
19    *   The key.
20    * @param mixed $default_value
21    *   Default value to return in case $key does not exist.
22    *
23    * @return mixed
24    *   The value of the stored setting.
25    */
26   public function get($key, $default_value);
27
28   /**
29    * Sets a check-specific setting value identified by $key.
30    *
31    * @param string $key
32    *   The key.
33    * @param mixed $value
34    *   The new value.
35    *
36    * @return CheckSettingsInterface
37    *   Returns itself.
38    */
39   public function set($key, $value);
40
41   /**
42    * Form constructor.
43    *
44    * @return array
45    *   The form structure.
46    */
47   public function buildForm();
48
49   /**
50    * Form validation handler.
51    *
52    * @param array $form
53    *   An associative array containing the structure of the form.
54    * @param array $values
55    *   The current values of the form.
56    */
57   public function validateForm(array &$form, array $values);
58
59   /**
60    * Form submission handler.
61    *
62    * @param array $form
63    *   An associative array containing the structure of the form.
64    * @param array $values
65    *   The current values of the form.
66    */
67   public function submitForm(array &$form, array $values);
68
69 }