You are here

public function Blocks::getBlock in Context 8.0

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

Get a block by id.

Parameters

string $blockId: The ID of the block to get.

Return value

BlockPluginInterface

1 call to Blocks::getBlock()
Blocks::submitConfigurationForm in src/Plugin/ContextReaction/Blocks.php
Form submission handler.

File

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

Class

Blocks
Provides a content reaction that will let you place blocks in the current themes regions.

Namespace

Drupal\context\Plugin\ContextReaction

Code

public function getBlock($blockId) {
  return $this
    ->getBlocks()
    ->get($blockId);
}