function WidgetBase::getWidgetState

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::getWidgetState()
  2. 10 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::getWidgetState()
  3. 8.9.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::getWidgetState()

File

core/lib/Drupal/Core/Field/WidgetBase.php, line 495

Class

WidgetBase
Base class for 'Field widget' plugin implementations.

Namespace

Drupal\Core\Field

Code

public static function getWidgetState(array $parents, $field_name, FormStateInterface $form_state) {
  return NestedArray::getValue($form_state->getStorage(), static::getWidgetStateParents($parents, $field_name));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.