Defines the configuration context interface.
The configuration context object will contain predefined parameters used by the configuration object for storage operations and notifications and contextual data to be used by configuration event listeners.
Expanded class hierarchy of ContextInterface
All classes that implement ContextInterface
Drupal\Core\Config\ConfigFactory
config()
interface ContextInterface {
/**
* Initializes a configuration context for use.
*
* @return \Drupal\Core\Config\Context\ConfigContext
* The config context object.
*/
public function init();
/**
* Returns the stored value for a given key.
*
* @param string $key
* The key of the data to retrieve.
*
* @return mixed
* The stored value, or NULL if no value exists.
*/
public function get($key);
/**
* Saves a value for a given key.
*
* @param string $key
* The key of the data to store.
* @param mixed $value
* The data to store.
*/
public function set($key, $value);
/**
* Sets the uuid for the context.
*
* @return string
* The context's uuid.
*/
public function setUuid();
/**
* Gets the uuid for the context.
*
* @return string
* The context's uuid.
*/
public function getUuid();
/**
* Dispatches a config event.
*
* @param string $config_event_name
* Event name.
* @param \Drupal\Core\Config\Config $config
* (optional) Configuration object.
*/
public function notify($config_event_name, Config $config = NULL);
/**
* Sets the override data for a configuration object.
*
* @param string $config_name
* Configuration name.
* @param array data
* The override data.
*/
public function setOverrides($config_name, $data);
/**
* Gets the override data for a configuration object.
*
* @param string $config_name
* Configuration name.
*
* @return mixed
* The override data or FALSE if there is none.
*/
public function getOverrides($config_name);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContextInterface:: |
public | function | Sets the uuid for the context. | 1 |
ContextInterface:: |
public | function | Sets the override data for a configuration object. | 1 |
ContextInterface:: |
public | function | Saves a value for a given key. | 1 |
ContextInterface:: |
public | function | Dispatches a config event. | 1 |
ContextInterface:: |
public | function | Initializes a configuration context for use. | 1 |
ContextInterface:: |
public | function | Gets the uuid for the context. | 1 |
ContextInterface:: |
public | function | Gets the override data for a configuration object. | 1 |
ContextInterface:: |
public | function | Returns the stored value for a given key. | 1 |