You are here

public function Blocks::getBlock in Context 8.4

Same name and namespace in other branches
  1. 8 src/Plugin/ContextReaction/Blocks.php \Drupal\context\Plugin\ContextReaction\Blocks::getBlock()
  2. 8.0 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

\Drupal\Core\Block\BlockPluginInterface The specified block plugin.

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

File

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

Class

Blocks
Provides a content reaction.

Namespace

Drupal\context\Plugin\ContextReaction

Code

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