function EntityFormDisplay::extractFormValues

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

File

core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php, line 233

Class

EntityFormDisplay
Configuration entity.

Namespace

Drupal\Core\Entity\Entity

Code

public function extractFormValues(FieldableEntityInterface $entity, array &$form, FormStateInterface $form_state) {
  $extracted = [];
  foreach ($entity as $name => $items) {
    if ($widget = $this->getRenderer($name)) {
      $widget->extractFormValues($items, $form, $form_state);
      $extracted[$name] = $name;
    }
  }
  return $extracted;
}

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