public function LinkitFilter::settingsForm in Linkit 8.5
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/ LinkitFilter.php, line 156
Class
- LinkitFilter
- Provides a Linkit filter.
Namespace
Drupal\linkit\Plugin\FilterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['title'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Automatically set the <code>title</code> attribute to that of the (translated) referenced content'),
'#default_value' => $this->settings['title'],
'#attached' => [
'library' => [
'linkit/linkit.filter_html.admin',
],
],
];
return $form;
}