summaryrefslogtreecommitdiffstatshomepage
path: root/core/lib/Drupal/Core/Render/PreviewFallbackInterface.php
blob: cbaf6ac20a4985ec8e6a94114a1b0ce74e41a2d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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();

}