function TestItem::storageSettingsForm
Overrides FieldItemBase::storageSettingsForm
File
-
core/
modules/ field/ tests/ modules/ field_test/ src/ Plugin/ Field/ FieldType/ TestItem.php, line 77
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['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 $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.