You are here

private function Blocks::blockShouldBePlacedUniquely in Context 8.4

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

Check to see if the block should be uniquely placed.

Parameters

\Drupal\Core\Block\BlockPluginInterface $block: The block plugin.

Return value

bool TRUE if block should be placed uniquely, FALSE if not.

2 calls to Blocks::blockShouldBePlacedUniquely()
Blocks::buildConfigurationForm in src/Plugin/ContextReaction/Blocks.php
Form constructor.
Blocks::execute in src/Plugin/ContextReaction/Blocks.php
Executes the plugin.

File

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

Class

Blocks
Provides a content reaction.

Namespace

Drupal\context\Plugin\ContextReaction

Code

private function blockShouldBePlacedUniquely(BlockPluginInterface $block) {
  $configuration = $block
    ->getConfiguration();
  return isset($configuration['unique']) && $configuration['unique'];
}