interface PreviewFallbackInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Render/PreviewFallbackInterface.php \Drupal\Core\Render\PreviewFallbackInterface
- 10 core/lib/Drupal/Core/Render/PreviewFallbackInterface.php \Drupal\Core\Render\PreviewFallbackInterface
- 11.x core/lib/Drupal/Core/Render/PreviewFallbackInterface.php \Drupal\Core\Render\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
4 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 - BlockComponentRenderArrayTest.php in core/
modules/ layout_builder/ tests/ src/ Unit/ BlockComponentRenderArrayTest.php - SectionRenderTest.php in core/
modules/ layout_builder/ tests/ src/ Unit/ SectionRenderTest.php
File
-
core/
lib/ Drupal/ Core/ Render/ PreviewFallbackInterface.php, line 8
Namespace
Drupal\Core\RenderView 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. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.