You are here

public function FilterMarkdown::defaultConfiguration in Markdown 8.2

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides FilterBase::defaultConfiguration

1 call to FilterMarkdown::defaultConfiguration()
FilterMarkdown::getConfiguration in src/Plugin/Filter/FilterMarkdown.php
Gets this plugin's configuration.

File

src/Plugin/Filter/FilterMarkdown.php, line 96

Class

FilterMarkdown
Provides a filter for Markdown.

Namespace

Drupal\markdown\Plugin\Filter

Code

public function defaultConfiguration() {
  $configuration = parent::defaultConfiguration();

  // Ensure any filter format set is added to the configuration. This is
  // needed in the event the filters configuration is cached in the database.
  // @see filter_formats()
  // @see markdown_filter_format_load()
  $filterFormat = $this
    ->getFilterFormat();
  $configuration['filterFormat'] = $filterFormat ? $filterFormat
    ->id() : NULL;
  return $configuration;
}