You are here

protected function Block::getPluginCollection in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::getPluginCollection()
  2. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::getPluginCollection()

Encapsulates the creation of the block's LazyPluginCollection.

Return value

\Drupal\Component\Plugin\LazyPluginCollection The block's plugin collection.

2 calls to Block::getPluginCollection()
Block::getPlugin in core/modules/block/src/Entity/Block.php
Returns the plugin instance.
Block::getPluginCollections in core/modules/block/src/Entity/Block.php
Gets the plugin collections used by this object.

File

core/modules/block/src/Entity/Block.php, line 154

Class

Block
Defines a Block configuration entity class.

Namespace

Drupal\block\Entity

Code

protected function getPluginCollection() {
  if (!$this->pluginCollection) {
    $this->pluginCollection = new BlockPluginCollection(\Drupal::service('plugin.manager.block'), $this->plugin, $this
      ->get('settings'), $this
      ->id());
  }
  return $this->pluginCollection;
}