You are here

protected function Block::getPluginCollection in Drupal 8

Same name and namespace in other branches
  1. 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.

1 call to Block::getPluginCollection()
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;
}