You are here

public function CodeMirrorEditor::settingsForm in The CodeMirror Editor 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/CodeMirrorEditor.php, line 32

Class

CodeMirrorEditor
Provides a 'CodeMirror' filter.

Namespace

Drupal\codemirror_editor\Plugin\Filter

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $keys = [
    'lineWrapping',
    'lineNumbers',
    'foldGutter',
  ];
  return self::buildCodeMirrorSettingsForm($this->settings, $keys);
}