You are here

public function AttributeBase::setConfiguration in Linkit 8.4

Sets the configuration for this plugin instance.

Parameters

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

Overrides ConfigurablePluginInterface::setConfiguration

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

File

src/AttributeBase.php, line 52
Contains \Drupal\linkit\AttributeBase.

Class

AttributeBase
Provides a base class for attribute plugins.

Namespace

Drupal\linkit

Code

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