Pull merge.
[yaffs-website] / web / core / lib / Drupal / Core / Config / Entity / ThirdPartySettingsInterface.php
1 <?php
2
3 namespace Drupal\Core\Config\Entity;
4
5 /**
6  * Interface for configuration entities to store third party information.
7  *
8  * A third party is a module that needs to store tightly coupled information to
9  * the configuration entity. For example, a module alters the node type form
10  * can use this to store its configuration so that it will be deployed with the
11  * node type.
12  */
13 interface ThirdPartySettingsInterface {
14
15   /**
16    * Sets the value of a third-party setting.
17    *
18    * @param string $module
19    *   The module providing the third-party setting.
20    * @param string $key
21    *   The setting name.
22    * @param mixed $value
23    *   The setting value.
24    *
25    * @return $this
26    */
27   public function setThirdPartySetting($module, $key, $value);
28
29   /**
30    * Gets the value of a third-party setting.
31    *
32    * @param string $module
33    *   The module providing the third-party setting.
34    * @param string $key
35    *   The setting name.
36    * @param mixed $default
37    *   The default value
38    *
39    * @return mixed
40    *   The value.
41    */
42   public function getThirdPartySetting($module, $key, $default = NULL);
43
44   /**
45    * Gets all third-party settings of a given module.
46    *
47    * @param string $module
48    *   The module providing the third-party settings.
49    *
50    * @return array
51    *   An array of key-value pairs.
52    */
53   public function getThirdPartySettings($module);
54
55   /**
56    * Unsets a third-party setting.
57    *
58    * @param string $module
59    *   The module providing the third-party setting.
60    * @param string $key
61    *   The setting name.
62    *
63    * @return mixed
64    *   The value.
65    */
66   public function unsetThirdPartySetting($module, $key);
67
68   /**
69    * Gets the list of third parties that store information.
70    *
71    * @return array
72    *   The list of third parties.
73    */
74   public function getThirdPartyProviders();
75
76 }