public static function AssociativeArray::validateAssociativeArray in Map Widget 8
Form API callback: Processes an associative array form element.
This method is assigned as a #element_validate callback in getInfo() method.
File
- src/
Element/ AssociativeArray.php, line 84
Class
- AssociativeArray
- Class KeyValuePair provides a form element for entering paired values.
Namespace
Drupal\map_widget\ElementCode
public static function validateAssociativeArray(&$element, FormStateInterface $form_state, &$complete_form) {
if (isset($element['#value']) && is_array($element['#value'])) {
$form_state
->setValueForElement($element, $element['#value']);
}
}