function FieldStorageConfigEditForm::buildForm
Same name in other branches
- 9 core/modules/field_ui/src/Form/FieldStorageConfigEditForm.php \Drupal\field_ui\Form\FieldStorageConfigEditForm::buildForm()
- 8.9.x core/modules/field_ui/src/Form/FieldStorageConfigEditForm.php \Drupal\field_ui\Form\FieldStorageConfigEditForm::buildForm()
- 10 core/modules/field_ui/src/Form/FieldStorageConfigEditForm.php \Drupal\field_ui\Form\FieldStorageConfigEditForm::buildForm()
Parameters
array $form: A nested array form elements comprising the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\field\FieldConfigInterface|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 72
Class
- FieldStorageConfigEditForm
- Provides a form for the "field storage" edit page.
Namespace
Drupal\field_ui\FormCode
public function buildForm(array $form, FormStateInterface $form_state, FieldConfigInterface|string|null $field_config = NULL) {
if ($field_config) {
$field = $field_config;
if (is_string($field)) {
$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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.