function IHaveRuntimeContexts::build

Same name in other branches
  1. 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/IHaveRuntimeContexts.php \Drupal\layout_builder_test\Plugin\Block\IHaveRuntimeContexts::build()
  2. 11.x core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/IHaveRuntimeContexts.php \Drupal\layout_builder_test\Plugin\Block\IHaveRuntimeContexts::build()

Overrides BlockPluginInterface::build

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/IHaveRuntimeContexts.php, line 26

Class

IHaveRuntimeContexts
Defines a class for a context-aware block.

Namespace

Drupal\layout_builder_test\Plugin\Block

Code

public function build() {
    return [
        '#markup' => $this->getContextValue('runtime_contexts'),
    ];
}

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