FieldStorageConfigEditForm::buildForm

public FieldStorageConfigEditForm::buildForm(array $form, FormStateInterface $form_state, $field_config = NULL)

Parameters

string $field_config: The ID of the field config whose field storage config is being edited.

Overrides EntityForm::buildForm

File

core/modules/field_ui/src/Form/FieldStorageConfigEditForm.php, line 45

Class

FieldStorageConfigEditForm
Provides a form for the "field storage" edit page.

Namespace

Drupal\field_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $field_config = NULL) {
  if ($field_config) {
    $field = FieldConfig::load($field_config);
    $form_state->set('field_config', $field);

    $form_state->set('entity_type_id', $field->getTargetEntityTypeId());
    $form_state->set('bundle', $field->getTargetBundle());
  }

  return parent::buildForm($form, $form_state);
}
doc_Drupal
2016-10-29 09:12:28
Comments
Leave a Comment

Please login to continue.