You are here

public function Blocks::getBlocks in Context 8.4

Same name and namespace in other branches
  1. 8 src/Plugin/ContextReaction/Blocks.php \Drupal\context\Plugin\ContextReaction\Blocks::getBlocks()
  2. 8.0 src/Plugin/ContextReaction/Blocks.php \Drupal\context\Plugin\ContextReaction\Blocks::getBlocks()

Get all blocks as a collection.

Return value

\Drupal\Core\Block\BlockPluginInterface[]|BlockCollection The collection of blocks.

1 call to Blocks::getBlocks()
Blocks::calculateDependencies in src/Plugin/ContextReaction/Blocks.php
Calculates dependencies for the configured plugin.

File

src/Plugin/ContextReaction/Blocks.php, line 434

Class

Blocks
Provides a content reaction.

Namespace

Drupal\context\Plugin\ContextReaction

Code

public function getBlocks() {
  if (!$this->blocksCollection) {
    $this->blocksCollection = new BlockCollection($this->blockManager, $this->blocks);
  }
  return $this->blocksCollection;
}