function ViewsBlockBase::getPreviewFallbackString

Same name in other branches
  1. 9 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()
  2. 10 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()
  3. 11.x core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::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,
        ]);
    }
}

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