You are here

public function SimpleConfigSectionStorage::getContextsDuringPreview in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::getContextsDuringPreview()
  2. 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::getContextsDuringPreview()

Gets contexts for use during preview.

When not in preview, ::getContexts() will be used.

Return value

\Drupal\Core\Plugin\Context\ContextInterface[] The plugin contexts suitable for previewing.

Overrides SectionStorageInterface::getContextsDuringPreview

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php, line 199

Class

SimpleConfigSectionStorage
Provides section storage utilizing simple config.

Namespace

Drupal\layout_builder_test\Plugin\SectionStorage

Code

public function getContextsDuringPreview() {
  return $this
    ->getContexts();
}