Interface definition for plugin with settings.
Expanded class hierarchy of PluginSettingsInterface
All classes that implement PluginSettingsInterface
interface PluginSettingsInterface extends PluginInspectionInterface {
/**
* Returns the array of settings, including defaults for missing settings.
*
* @return array
* The array of settings.
*/
public function getSettings();
/**
* Returns the value of a setting, or its default value if absent.
*
* @param string $key
* The setting name.
*
* @return mixed
* The setting value.
*/
public function getSetting($key);
/**
* Returns the default settings for the plugin.
*
* @return array
* The array of default setting values, keyed by setting names.
*/
public function getDefaultSettings();
/**
* Sets the settings for the plugin.
*
* @param array $settings
* The array of settings, keyed by setting names. Missing settings will be
* assigned their default values.
*
* @return Drupal\field\Plugin\PluginSettingsInterface
* The plugin itself.
*/
public function setSettings(array $settings);
/**
* Sets the value of a setting for the plugin.
*
* @param string $key
* The setting name.
* @param mixed $value
* The setting value.
*
* @return Drupal\field\Plugin\PluginSettingsInterface
* The plugin itself.
*/
public function setSetting($key, $value);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginInspectionInterface:: |
public | function | Returns the definition of the plugin implementation. | 1 |
PluginInspectionInterface:: |
public | function | Returns the plugin_id of the plugin instance. | 1 |
PluginSettingsInterface:: |
public | function | Returns the default settings for the plugin. | 1 |
PluginSettingsInterface:: |
public | function | Returns the value of a setting, or its default value if absent. | 1 |
PluginSettingsInterface:: |
public | function | Returns the array of settings, including defaults for missing settings. | 1 |
PluginSettingsInterface:: |
public | function | Sets the value of a setting for the plugin. | 1 |
PluginSettingsInterface:: |
public | function | Sets the settings for the plugin. | 1 |