public function FilterElf::settingsForm in External Links Filter 8
Generates a filter's settings form.
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/ FilterElf.php, line 35
Class
- FilterElf
- Adds a CSS class to all external and mailto links.
Namespace
Drupal\elf\Plugin\FilterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['elf_nofollow'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Add rel="nofollow" to all external links'),
'#default_value' => $this->settings['elf_nofollow'],
];
return $form;
}