You are here

interface PatternSettingTypeInterface in UI Patterns Settings 8.2

Same name and namespace in other branches
  1. 8 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 13

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.
   * @param string $form_type
   *   The form type. Either layout or layouts_display or display.
   *
   * @return array
   *   The configuration form.
   */
  public function settingsForm(array $form, $value, PatternDefinitionSetting $def, $form_type);

  /**
   * 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 processed setting variable for an exposed field.
   *
   * @param \Drupal\Core\Field\FieldItemList $field
   *   The stored value.
   *
   * @return mixed
   *   The processed value.
   */
  public function preprocessExposedField(FieldItemList $field);

  /**
   * Returns the settings configuration form.
   *
   * @param array $form
   *   The form definition array for the settings configuration form.
   * @param string $value
   *   The stored default value.
   * @param string $token_value
   *   The stored token value.
   * @param string $form_type
   *   The form type. Either layout or layouts_display or display.
   */
  public function buildConfigurationForm(array $form, $value, $token_value, $form_type);

  /**
   * Alter the storage of a connected field storage.
   *
   * @param \Drupal\field\Entity\FieldStorageConfig $storage_config
   *   The storage type.
   */
  public function alterFieldStorage(FieldStorageConfig $storage_config);

  /**
   * Returns the list to matching field types.
   *
   * @return array
   *   The list of exposable field types
   */
  public function fieldStorageExposableTypes();

}

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::alterFieldStorage public function Alter the storage of a connected field storage. 1
PatternSettingTypeInterface::buildConfigurationForm public function Returns the settings configuration form. 1
PatternSettingTypeInterface::fieldStorageExposableTypes public function Returns the list to matching field types. 1
PatternSettingTypeInterface::preprocess public function Returns the processed setting variable. 1
PatternSettingTypeInterface::preprocessExposedField public function Returns the processed setting variable for an exposed field. 1
PatternSettingTypeInterface::settingsForm public function Returns the configuration form elements specific to this settings plugin.. 9
PatternSettingTypeInterface::settingsPreprocess public function Preprocess setting variable. 1