You are here

public static function YamlFormElementStates::convertFormValuesToFormApiStates in YAML Form 8

Convert form values to states array.

Parameters

array $values: Submitted form values to converted to states array.

Return value

array An associative array of states.

1 call to YamlFormElementStates::convertFormValuesToFormApiStates()
YamlFormElementStates::validateYamlFormElementStates in src/Element/YamlFormElementStates.php
Validates form states element.

File

src/Element/YamlFormElementStates.php, line 645

Class

YamlFormElementStates
Provides a form element to edit an element's #states.

Namespace

Drupal\yamlform\Element

Code

public static function convertFormValuesToFormApiStates(array $values = []) {
  $values = self::convertFormValuesToStatesArray($values);
  return self::convertStatesArrayToFormApiStates($values);
}