function BlockPluginCollection::__construct

Same name in other branches
  1. 9 core/modules/block/src/BlockPluginCollection.php \Drupal\block\BlockPluginCollection::__construct()
  2. 8.9.x core/modules/block/src/BlockPluginCollection.php \Drupal\block\BlockPluginCollection::__construct()
  3. 11.x core/modules/block/src/BlockPluginCollection.php \Drupal\block\BlockPluginCollection::__construct()

Constructs a new BlockPluginCollection.

Parameters

\Drupal\Component\Plugin\PluginManagerInterface $manager: The manager to be used for instantiating plugins.

string $instance_id: The ID of the plugin instance.

array $configuration: An array of configuration.

string $block_id: The unique ID of the block entity using this plugin.

Overrides DefaultSingleLazyPluginCollection::__construct

File

core/modules/block/src/BlockPluginCollection.php, line 33

Class

BlockPluginCollection
Provides a collection of block plugins.

Namespace

Drupal\block

Code

public function __construct(PluginManagerInterface $manager, $instance_id, array $configuration, $block_id) {
    parent::__construct($manager, $instance_id, $configuration);
    $this->blockId = $block_id;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.