You are here

protected function RecipientTypePluginCollection::initializePlugin in Workbench Email 8

Same name and namespace in other branches
  1. 2.x src/RecipientTypePluginCollection.php \Drupal\workbench_email\RecipientTypePluginCollection::initializePlugin()

Initializes and stores a plugin.

Parameters

string $instance_id: The ID of the plugin instance to initialize.

Overrides DefaultLazyPluginCollection::initializePlugin

1 call to RecipientTypePluginCollection::initializePlugin()
RecipientTypePluginCollection::getAll in src/RecipientTypePluginCollection.php
Retrieves plugin definitions and creates an instance for each.

File

src/RecipientTypePluginCollection.php, line 50

Class

RecipientTypePluginCollection
A collection of recipient types.

Namespace

Drupal\workbench_email

Code

protected function initializePlugin($instance_id) {
  $configuration = $this->manager
    ->getDefinition($instance_id);

  // Merge the actual configuration into the default configuration.
  if (isset($this->configurations[$instance_id])) {
    $configuration = NestedArray::mergeDeep($configuration, $this->configurations[$instance_id]);
  }
  $this->configurations[$instance_id] = $configuration;
  parent::initializePlugin($instance_id);
}