Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldBlock.php

function FieldBlock::getPreviewFallbackString

Overrides BlockPluginTrait::getPreviewFallbackString

File

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

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(),
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal