You are here

public function MissingParser::getConfiguration in Markdown 8.2

Gets this plugin's configuration.

Return value

array An array of this plugin's configuration.

Overrides InstallablePluginBase::getConfiguration

File

src/Plugin/Markdown/MissingParser.php, line 66

Class

MissingParser
The parser used as a fallback when the requested one doesn't exist.

Namespace

Drupal\markdown\Plugin\Markdown

Code

public function getConfiguration() {

  // Only add default values as existing configuration may have already
  // already been passed. This may be due to a plugin rename/config changes.
  $configuration = $this->configuration ?: [];
  $configuration += [
    'id' => $this
      ->getPluginId(),
    'render_strategy' => [],
  ];
  $configuration['render_strategy'] += [
    'type' => $this
      ->getRenderStrategy(),
    'custom_allowed_html' => $this
      ->getCustomAllowedHtml(),
    'plugins' => $this
      ->getAllowedHtmlPlugins(),
  ];
  ksort($configuration['render_strategy']['plugins']);
  return $configuration;
}