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

Breadcrumb

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

interface PreviewFallbackInterface

Allows an element to provide a fallback representation of itself for preview.

Hierarchy

  • interface \Drupal\Core\Render\PreviewFallbackInterface

Expanded class hierarchy of PreviewFallbackInterface

All classes that implement PreviewFallbackInterface

2 files declare their use of PreviewFallbackInterface
BlockBase.php in core/lib/Drupal/Core/Block/BlockBase.php
BlockComponentRenderArray.php in core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php

File

core/lib/Drupal/Core/Render/PreviewFallbackInterface.php, line 8

Namespace

Drupal\Core\Render
View source
interface PreviewFallbackInterface {
    
    /**
     * Returns a string to be used as a fallback during preview.
     *
     * This is typically used when an element has no output and must be displayed,
     * for example during configuration.
     *
     * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup
     *   A string representing for this.
     */
    public function getPreviewFallbackString();

}

Members

Title Sort descending Modifiers Object type Summary
PreviewFallbackInterface::getPreviewFallbackString public function Returns a string to be used as a fallback during preview.

API Navigation

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