public function TextWithSummaryItem::fieldSettingsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::fieldSettingsForm()
Returns a form for the field-level settings.
Invoked from \Drupal\field_ui\Form\FieldConfigEditForm to allow administrators to configure field-level settings.
Parameters
array $form: The form where the settings form is being included in.
\Drupal\Core\Form\FormStateInterface $form_state: The form state of the (entire) configuration form.
Return value
array The form definition for the field settings.
Overrides FieldItemBase::fieldSettingsForm
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php, line 92 - Contains \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem.
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 = array();
$settings = $this
->getSettings();
$element['display_summary'] = array(
'#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.'),
);
return $element;
}