function Block::getPluginCollection

Same name in other branches
  1. 9 core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::getPluginCollection()
  2. 8.9.x core/modules/block/src/Entity/Block.php \Drupal\block\Entity\Block::getPluginCollection()
  3. 11.x 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

File

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

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

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