public function ViewsBlockBase::getPreviewFallbackString in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()
- 9 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\BlockCode
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,
]);
}
}