You are here

public function ViewsBlockBase::getPreviewFallbackString in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()

Overrides BlockPluginTrait::getPreviewFallbackString

File

core/modules/views/src/Plugin/Block/ViewsBlockBase.php, line 112

Class

ViewsBlockBase
Base class for Views block plugins.

Namespace

Drupal\views\Plugin\Block

Code

public function getPreviewFallbackString() {
  if (!empty($this->pluginDefinition["admin_label"])) {
    return $this
      ->t('"@view" views block', [
      '@view' => $this->pluginDefinition["admin_label"],
    ]);
  }
  else {
    return $this
      ->t('"@view" views block', [
      '@view' => $this->view->storage
        ->label() . '::' . $this->displayID,
    ]);
  }
}