You are here

protected function ParagraphsBehaviorCollection::initializePlugin in Paragraphs 8

Initializes and stores a plugin.

Parameters

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

Overrides DefaultLazyPluginCollection::initializePlugin

1 call to ParagraphsBehaviorCollection::initializePlugin()
ParagraphsBehaviorCollection::getAll in src/ParagraphsBehaviorCollection.php
Retrieves all behavior plugins definitions and creates an instance for each one.

File

src/ParagraphsBehaviorCollection.php, line 66

Class

ParagraphsBehaviorCollection
A collection of paragraphs behavior plugins.

Namespace

Drupal\paragraphs

Code

protected function initializePlugin($instance_id) {
  $configuration = isset($this->configurations[$instance_id]) ? $this->configurations[$instance_id] : [];
  $this
    ->set($instance_id, $this->manager
    ->createInstance($instance_id, $configuration));
}