You are here

public function ModeBlock::preBlockBuild in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php \Drupal\social_activity\Plugin\views\display\ModeBlock::preBlockBuild()
  2. 8.8 modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php \Drupal\social_activity\Plugin\views\display\ModeBlock::preBlockBuild()
  3. 10.3.x modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php \Drupal\social_activity\Plugin\views\display\ModeBlock::preBlockBuild()
  4. 10.0.x modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php \Drupal\social_activity\Plugin\views\display\ModeBlock::preBlockBuild()
  5. 10.1.x modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php \Drupal\social_activity\Plugin\views\display\ModeBlock::preBlockBuild()

Allows to change the display settings right before executing the block.

Parameters

\Drupal\views\Plugin\Block\ViewsBlock $block: The block plugin for views displays.

Overrides Block::preBlockBuild

1 call to ModeBlock::preBlockBuild()
FilterBlock::preBlockBuild in modules/social_features/social_activity/modules/social_activity_filter/src/Plugin/views/display/FilterBlock.php
Allows to change the display settings right before executing the block.
1 method overrides ModeBlock::preBlockBuild()
FilterBlock::preBlockBuild in modules/social_features/social_activity/modules/social_activity_filter/src/Plugin/views/display/FilterBlock.php
Allows to change the display settings right before executing the block.

File

modules/social_features/social_activity/src/Plugin/views/display/ModeBlock.php, line 161

Class

ModeBlock
The plugin that handles a block.

Namespace

Drupal\social_activity\Plugin\views\display

Code

public function preBlockBuild(ViewsBlock $block) {
  parent::preBlockBuild($block);

  // Prepare values to use it in the views filter.
  $block_configuration = $block
    ->getConfiguration();
  if (isset($block_configuration['type'])) {
    $this->view->filter_type = $block_configuration['type'];
  }
}