You are here

public function TagPluginBase::setConfiguration in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/TagPluginBase.php \Drupal\xbbcode\Plugin\TagPluginBase::setConfiguration()

Set the plugin configuration after instancing.

Parameters

array $configuration: Plugin configuration.

Return value

$this

1 call to TagPluginBase::setConfiguration()
TagPluginBase::__construct in src/Plugin/TagPluginBase.php
Constructs a \Drupal\Component\Plugin\PluginBase object.

File

src/Plugin/TagPluginBase.php, line 66

Class

TagPluginBase
Provides a base class for XBBCode tag plugins.

Namespace

Drupal\xbbcode\Plugin

Code

public function setConfiguration(array $configuration) : self {
  if (isset($configuration['name'])) {
    $this->name = $configuration['name'];
  }
  if (isset($configuration['settings'])) {
    $this->settings = (array) $configuration['settings'];
  }
  return $this;
}