function BlockVariantTrait::getBlockCollection

Same name in other branches
  1. 8.x-3.x src/Plugin/BlockVariantTrait.php \Drupal\ctools\Plugin\BlockVariantTrait::getBlockCollection()

Returns the block plugins used for this display variant.

Return value

\Drupal\Core\Block\BlockPluginInterface[]|\Drupal\ctools\Plugin\BlockPluginCollection An array or collection of configured block plugins.

1 call to BlockVariantTrait::getBlockCollection()
BlockDisplayVariant::calculateDependencies in src/Plugin/DisplayVariant/BlockDisplayVariant.php
Calculates dependencies for the configured plugin.

File

src/Plugin/BlockVariantTrait.php, line 136

Class

BlockVariantTrait
Provides methods for \Drupal\ctools\Plugin\BlockVariantInterface.

Namespace

Drupal\ctools\Plugin

Code

protected function getBlockCollection() {
    if (!$this->blockPluginCollection) {
        $this->blockPluginCollection = new BlockPluginCollection($this->getBlockManager(), $this->getBlockConfig());
    }
    return $this->blockPluginCollection;
}