PreviewAwarePluginInterface.php
Same filename in other branches
Namespace
Drupal\Core\PluginFile
-
core/
lib/ Drupal/ Core/ Plugin/ PreviewAwarePluginInterface.php
View source
<?php
namespace Drupal\Core\Plugin;
/**
* Provides an interface to support preview mode injection in plugins.
*
* Block and layout plugins can implement this interface to be informed when
* preview mode is being used in Layout Builder.
*
* @see \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent
* @see \Drupal\layout_builder\Section::toRenderArray()
*/
interface PreviewAwarePluginInterface {
/**
* Set preview mode for the plugin.
*
* @param bool $in_preview
* TRUE if the plugin should be set to preview mode, FALSE otherwise.
*/
public function setInPreview(bool $in_preview) : void;
}
Interfaces
Title | Deprecated | Summary |
---|---|---|
PreviewAwarePluginInterface | Provides an interface to support preview mode injection in plugins. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.