function BlockPluginTrait::setInPreview

Same name in other branches
  1. 10 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::setInPreview()
  2. 11.x core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::setInPreview()

File

core/lib/Drupal/Core/Block/BlockPluginTrait.php, line 294

Class

BlockPluginTrait
Provides the base implementation of a block plugin.

Namespace

Drupal\Core\Block

Code

public function setInPreview(bool $in_preview) : void {
    $this->inPreview = $in_preview;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.