You are here

interface PatternSettingTypeInterface in UI Patterns Settings 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/PatternSettingTypeInterface.php \Drupal\ui_patterns_settings\Plugin\PatternSettingTypeInterface

Defines an interface for UI Patterns setting type plugins.

Hierarchy

Expanded class hierarchy of PatternSettingTypeInterface

All classes that implement PatternSettingTypeInterface

File

src/Plugin/PatternSettingTypeInterface.php, line 11

Namespace

Drupal\ui_patterns_settings\Plugin
View source
interface PatternSettingTypeInterface extends ConfigurableInterface {

  /**
   * Returns the configuration form elements specific to this settings plugin..
   *
   * @param array $form
   *   The form definition array for the settings configuration form.
   * @param string $value
   *   The stored default value.
   * @param \Drupal\ui_patterns_settings\Definition\PatternDefinitionSetting $def
   *   The pattern definition.
   *
   * @return array
   *   The configuration form.
   */
  public function settingsForm(array $form, $value, PatternDefinitionSetting $def);

  /**
   * Preprocess setting variable.
   *
   * @param string $value
   *   The stored value.
   * @param array $context
   *   Context informations.
   *   Keys:
   *    - entity.
   * @param \Drupal\ui_patterns_settings\Definition\PatternDefinitionSetting $def
   *   The pattern definition.
   *
   * @return string
   *   The processed value.
   */
  public function settingsPreprocess($value, array $context, PatternDefinitionSetting $def);

  /**
   * Returns the processed setting variable.
   *
   * @param string $value
   *   The stored value.
   * @param array $context
   *   Context informations.
   *
   * @return mixed
   *   The processed value.
   */
  public function preprocess($value, array $context);

  /**
   * Returns the settings configuration form.
   *
   * @param array $form
   *   The form definition array for the settings configuration form.
   * @param string $value
   *   The stored default value.
   */
  public function buildConfigurationForm(array $form, $value);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PatternSettingTypeInterface::buildConfigurationForm public function Returns the settings configuration form. 1
PatternSettingTypeInterface::preprocess public function Returns the processed setting variable. 1
PatternSettingTypeInterface::settingsForm public function Returns the configuration form elements specific to this settings plugin.. 7
PatternSettingTypeInterface::settingsPreprocess public function Preprocess setting variable. 1