You are here

public function Checkbox::getWidgetValue in Conditional Fields 8

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

Get values from widget settings for plugin.

Parameters

array $value_form: Dependency options.

Return value

mixed Values for triggering events.

Overrides ConditionalFieldsHandlerBase::getWidgetValue

1 call to Checkbox::getWidgetValue()
Checkbox::statesHandler in src/Plugin/conditional_fields/handler/Checkbox.php
@TODO: Different handlers for boolean and list fields.

File

src/Plugin/conditional_fields/handler/Checkbox.php, line 62

Class

Checkbox
Provides states handler for single on/off checkbox.

Namespace

Drupal\conditional_fields\Plugin\conditional_fields\handler

Code

public function getWidgetValue(array $value_form) {
  return isset($value_form[0]['value']) ? $value_form[0]['value'] : $value_form;
}