You are here

public function ReadmehelpMarkdown::setConfiguration in README Help 8

Sets the configuration for this plugin instance.

Parameters

array $configuration: An associative array containing the plugin's configuration.

Overrides FilterBase::setConfiguration

File

src/Plugin/Filter/ReadmehelpMarkdown.php, line 49

Class

ReadmehelpMarkdown
Provides a filter for markdown.

Namespace

Drupal\readmehelp\Plugin\Filter

Code

public function setConfiguration(array $configuration) {
  if (isset($configuration['status'])) {
    $this->status = (bool) $configuration['status'];
  }
  if (isset($configuration['weight'])) {

    // Always run this filter as the very first.
    $this->weight = -100;
  }
  if (isset($configuration['settings'])) {
    $this->settings = (array) $configuration['settings'];
  }
  return $this;
}