You are here

interface WidgetDefaultsInterface in Simple hierarchical select 8

Same name and namespace in other branches
  1. 2.0.x src/WidgetDefaultsInterface.php \Drupal\shs\WidgetDefaultsInterface

Interface for default values on SHS widgets.

Hierarchy

Expanded class hierarchy of WidgetDefaultsInterface

All classes that implement WidgetDefaultsInterface

File

src/WidgetDefaultsInterface.php, line 8

Namespace

Drupal\shs
View source
interface WidgetDefaultsInterface {

  /**
   * Gets an initial default values array.
   *
   * @param string $default_value
   *   The default value.
   *
   * @return array
   *   The initial default value array.
   */
  public function getInitialParentDefaults($default_value);

  /**
   * Load parents for default values.
   *
   * @param array|string $default_values
   *   List of default values of the widget.
   * @param string $any_value
   *   The value to assign to "any value".
   * @param string $entity_type
   *   The entity type the select is displaying.
   *
   * @return array
   *   List of parents for each default value.
   */
  public function getParentDefaults($default_values, $any_value, $entity_type);

}

Members

Namesort descending Modifiers Type Description Overrides
WidgetDefaultsInterface::getInitialParentDefaults public function Gets an initial default values array. 1
WidgetDefaultsInterface::getParentDefaults public function Load parents for default values. 1