You are here

public function MessagePurgeBase::setConfiguration in Message 8

Sets the configuration for this plugin instance.

Parameters

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

Overrides ConfigurableInterface::setConfiguration

1 call to MessagePurgeBase::setConfiguration()
MessagePurgeBase::__construct in src/MessagePurgeBase.php
Constructs a MessagePurgeBase object.

File

src/MessagePurgeBase.php, line 165

Class

MessagePurgeBase
Base implementation for MessagePurge plugins.

Namespace

Drupal\message

Code

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