function FieldConfigEditForm::afterBuild

Same name in other branches
  1. 10 core/modules/field_ui/src/Form/FieldConfigEditForm.php \Drupal\field_ui\Form\FieldConfigEditForm::afterBuild()

Overrides EntityForm::afterBuild

File

core/modules/field_ui/src/Form/FieldConfigEditForm.php, line 234

Class

FieldConfigEditForm
Provides a form for the field settings form.

Namespace

Drupal\field_ui\Form

Code

public function afterBuild(array $element, FormStateInterface $form_state) {
    // Delegate ::afterBuild to the subform.
    // @todo remove after https://www.drupal.org/i/3385205 has been addressed.
    if (isset($element['field_storage_submit'])) {
        $field_storage_form = $this->entityTypeManager
            ->getFormObject('field_storage_config', $this->operation);
        $field_storage_form->setEntity($this->entity
            ->getFieldStorageDefinition());
        return $field_storage_form->afterBuild($element, SubformState::createForSubform($element, $form_state->getCompleteForm(), $form_state));
    }
    return parent::afterBuild($element, $form_state);
}

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