You are here

public function FlexiformEntityFormDisplay::processForm in Flexiform 8

Process callback: assigns weights and hides extra fields.

Overrides EntityFormDisplay::processForm

See also

\Drupal\Core\Entity\Entity\EntityFormDisplay::buildForm()

File

src/FlexiformEntityFormDisplay.php, line 322

Class

FlexiformEntityFormDisplay
Defines a class to extend EntityFormDisplays.

Namespace

Drupal\flexiform

Code

public function processForm($element, FormStateInterface $form_state, $form) {
  $element = parent::processForm($element, $form_state, $form);
  foreach ($this
    ->getFormEnhancers('process_form') as $enhancer) {
    $element = $enhancer
      ->processForm($element, $form_state, $form);
  }
  static::addSaveFormEntitiesSubmit($element, $this);
  return $element;
}