You are here

interface WebformPluginSettingsInterface in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformPluginSettingsInterface.php \Drupal\webform\Plugin\WebformPluginSettingsInterface

An interface for managing a plugin's settings\.

Hierarchy

Expanded class hierarchy of WebformPluginSettingsInterface

All classes that implement WebformPluginSettingsInterface

File

src/Plugin/WebformPluginSettingsInterface.php, line 8

Namespace

Drupal\webform\Plugin
View source
interface WebformPluginSettingsInterface {

  /**
   * Returns the plugin's settings.
   *
   * @return array
   *   A structured array containing all the plugin's settings.
   */
  public function getSettings();

  /**
   * Update a plugin's settings.
   *
   * @param array $settings
   *   The structured array containing the plugin's settings to be updated.
   *
   * @return $this
   */
  public function setSettings(array $settings);

  /**
   * Returns the plugin setting for given key
   *
   * @param string $key
   *   The key of the plugin setting to retrieve.
   *
   * @return mixed
   *   The settings value, or NULL if no settings exists.
   */
  public function getSetting($key);

  /**
   * Sets a plugin setting for a given key.
   *
   * @param string $key
   *   The key of the setting to be updated.
   * @param mixed $value
   *   The value for the settings..
   *
   * @return $this
   */
  public function setSetting($key, $value);

}

Members

Namesort descending Modifiers Type Description Overrides
WebformPluginSettingsInterface::getSetting public function Returns the plugin setting for given key
WebformPluginSettingsInterface::getSettings public function Returns the plugin's settings.
WebformPluginSettingsInterface::setSetting public function Sets a plugin setting for a given key.
WebformPluginSettingsInterface::setSettings public function Update a plugin's settings.