You are here

protected function Block::getPluginCollection in Zircon Profile 8

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

File

core/modules/block/src/Entity/Block.php, line 149
Contains \Drupal\block\Entity\Block.

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;
}