You are here

public function ConditionalFieldsHandlerBase::getWidgetValue in Conditional Fields 8

Same name and namespace in other branches
  1. 4.x src/ConditionalFieldsHandlerBase.php \Drupal\conditional_fields\ConditionalFieldsHandlerBase::getWidgetValue()

Get values from widget settings for plugin.

Parameters

array $value_form: Dependency options.

Return value

mixed Values for triggering events.

Overrides ConditionalFieldsHandlersPluginInterface::getWidgetValue

4 calls to ConditionalFieldsHandlerBase::getWidgetValue()
DateDefault::statesHandler in src/Plugin/conditional_fields/handler/DateDefault.php
Executes states handler according to conditional fields settings.
DateList::statesHandler in src/Plugin/conditional_fields/handler/DateList.php
Executes states handler according to conditional fields settings.
LanguageSelect::statesHandler in src/Plugin/conditional_fields/handler/LanguageSelect.php
Executes states handler according to conditional fields settings.
Number::statesHandler in src/Plugin/conditional_fields/handler/Number.php
Executes states handler according to conditional fields settings.
5 methods override ConditionalFieldsHandlerBase::getWidgetValue()
Checkbox::getWidgetValue in src/Plugin/conditional_fields/handler/Checkbox.php
Get values from widget settings for plugin.
EntityReference::getWidgetValue in src/Plugin/conditional_fields/handler/EntityReference.php
Get values from widget settings for plugin.
EntityReferenceTags::getWidgetValue in src/Plugin/conditional_fields/handler/EntityReferenceTags.php
Get values from widget settings for plugin.
LinkField::getWidgetValue in src/Plugin/conditional_fields/handler/LinkField.php
Get values from widget settings for plugin.
OptionsButtons::getWidgetValue in src/Plugin/conditional_fields/handler/OptionsButtons.php
Get values from widget settings for plugin.

File

src/ConditionalFieldsHandlerBase.php, line 13

Class

ConditionalFieldsHandlerBase
Defines a base handler implementation that most handlers plugins will extend.

Namespace

Drupal\conditional_fields

Code

public function getWidgetValue(array $value_form) {
  if (empty($value_form)) {
    return null;
  }
  else {
    return $value_form[0]['value'];
  }
}