function TestItem::storageSettingsForm
Same name in other branches
- 9 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::storageSettingsForm()
- 8.9.x core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::storageSettingsForm()
- 10 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php \Drupal\field_test\Plugin\Field\FieldType\TestItem::storageSettingsForm()
Overrides FieldItemBase::storageSettingsForm
File
-
core/
modules/ field/ tests/ modules/ field_test/ src/ Plugin/ Field/ FieldType/ TestItem.php, line 78
Class
- TestItem
- Defines the 'test_field' entity field item.
Namespace
Drupal\field_test\Plugin\Field\FieldTypeCode
public function storageSettingsForm(array &$form, FormStateInterface $form_state, $has_data) {
$form['cardinality_container'][] = [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => 'Greetings from ' . __METHOD__,
];
$element = [];
$element['test_field_storage_setting'] = [
'#type' => 'textfield',
'#title' => $this->t('Field test field storage setting'),
'#default_value' => $this->getSetting('test_field_storage_setting'),
'#required' => FALSE,
'#description' => $this->t('A dummy form element to simulate field storage setting.'),
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.