function TextWithSummaryItem::fieldSettingsForm
Same name in other branches
- 9 core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::fieldSettingsForm()
- 10 core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::fieldSettingsForm()
- 11.x core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::fieldSettingsForm()
Overrides FieldItemBase::fieldSettingsForm
File
-
core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php, line 88
Class
- TextWithSummaryItem
- Plugin implementation of the 'text_with_summary' field type.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
$element = [];
$settings = $this->getSettings();
$element['display_summary'] = [
'#type' => 'checkbox',
'#title' => t('Summary input'),
'#default_value' => $settings['display_summary'],
'#description' => t('This allows authors to input an explicit summary, to be displayed instead of the automatically trimmed text when using the "Summary or trimmed" display type.'),
];
$element['required_summary'] = [
'#type' => 'checkbox',
'#title' => t('Require summary'),
'#description' => t('The summary will also be visible when marked as required.'),
'#default_value' => $settings['required_summary'],
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.