function TextItem::storageSettingsForm
Same name in other branches
- 9 core/modules/text/src/Plugin/Field/FieldType/TextItem.php \Drupal\text\Plugin\Field\FieldType\TextItem::storageSettingsForm()
- 8.9.x core/modules/text/src/Plugin/Field/FieldType/TextItem.php \Drupal\text\Plugin\Field\FieldType\TextItem::storageSettingsForm()
- 10 core/modules/text/src/Plugin/Field/FieldType/TextItem.php \Drupal\text\Plugin\Field\FieldType\TextItem::storageSettingsForm()
Overrides FieldItemBase::storageSettingsForm
File
-
core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextItem.php, line 83
Class
- TextItem
- Plugin implementation of the 'text' field type.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public function storageSettingsForm(array &$form, FormStateInterface $form_state, $has_data) {
$element = [];
$element['max_length'] = [
'#type' => 'number',
'#title' => $this->t('Maximum length'),
'#default_value' => $this->getSetting('max_length'),
'#required' => TRUE,
'#description' => $this->t('The maximum length of the field in characters.'),
'#min' => 1,
'#disabled' => $has_data,
];
$element += parent::storageSettingsForm($form, $form_state, $has_data);
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.