PreviewFallbackInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Render/PreviewFallbackInterface.php
  2. 8.9.x core/lib/Drupal/Core/Render/PreviewFallbackInterface.php
  3. 11.x core/lib/Drupal/Core/Render/PreviewFallbackInterface.php

Namespace

Drupal\Core\Render

File

core/lib/Drupal/Core/Render/PreviewFallbackInterface.php

View source
<?php

namespace Drupal\Core\Render;


/**
 * Allows an element to provide a fallback representation of itself for preview.
 */
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();

}

Interfaces

Title Deprecated Summary
PreviewFallbackInterface Allows an element to provide a fallback representation of itself for preview.

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