public function FootnotesFilter::settingsForm in Footnotes 8.2
Create the settings form for the filter.
@todo Add validation of submited form values, it already exists for drupal 7, must update it only.
Parameters
array $form: A minimally prepopulated form array.
\Drupal\Core\Form\FormStateInterface $form_state: The state of the (entire) configuration form.
Return value
array The $form array with additional form elements for the settings of this filter. The submitted form values should match $this->settings.
Overrides FilterBase::settingsForm
File
- src/
Plugin/ Filter/ FootnotesFilter.php, line 334
Class
- FootnotesFilter
- Provides a base filter for Footnotes filter.
Namespace
Drupal\footnotes\Plugin\FilterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$settings['footnotes_collapse'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Collapse footnotes with identical content'),
'#default_value' => $this->settings['footnotes_collapse'],
'#description' => $this
->t('If two footnotes have the exact same content, they will be collapsed into one as if using the same value="" attribute.'),
];
$settings['footnotes_html'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Handle footnote text as HTML'),
'#default_value' => $this->settings['footnotes_html'],
'#description' => $this
->t('If not checked, a HTML tag in the footnote text will be shown as-is to the user.'),
];
return $settings;
}