You are here

public function FieldBlock::getPreviewFallbackString in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::getPreviewFallbackString()

Overrides BlockPluginTrait::getPreviewFallbackString

File

core/modules/layout_builder/src/Plugin/Block/FieldBlock.php, line 179

Class

FieldBlock
Provides a block that renders a field from an entity.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public function getPreviewFallbackString() {
  return new TranslatableMarkup('"@field" field', [
    '@field' => $this
      ->getFieldDefinition()
      ->getLabel(),
  ]);
}