public function PluginBag::set

Stores an initialized plugin.

Parameters

string $instance_id: The ID of the plugin instance being stored.

mixed $value: An instantiated plugin.

File

drupal/core/lib/Drupal/Component/Plugin/PluginBag.php, line 81
Contains \Drupal\Component\Plugin\PluginBag.

Class

PluginBag
Defines an object which stores multiple plugin instances to lazy load them.

Namespace

Drupal\Component\Plugin

Code

public function set($instance_id, $value) {
  $this->pluginInstances[$instance_id] = $value;
}