You are here

public function MatcherBase::setConfiguration in Linkit 8.5

Same name and namespace in other branches
  1. 8.4 src/MatcherBase.php \Drupal\linkit\MatcherBase::setConfiguration()

Sets the configuration for this plugin instance.

Parameters

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

Overrides ConfigurableInterface::setConfiguration

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

File

src/MatcherBase.php, line 100

Class

MatcherBase
Provides a base class for matchers.

Namespace

Drupal\linkit

Code

public function setConfiguration(array $configuration) {
  $configuration += [
    'uuid' => '',
    'weight' => '0',
    'settings' => [],
  ];
  $this->configuration = $configuration['settings'] + $this
    ->defaultConfiguration();
  $this->uuid = $configuration['uuid'];
  $this->weight = $configuration['weight'];
  return $this;
}