function IHaveRuntimeContexts::getAvailableContexts

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

Overrides ContextProviderInterface::getAvailableContexts

File

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

Class

IHaveRuntimeContexts
Defines a class for a fake context provider.

Namespace

Drupal\layout_builder_test\ContextProvider

Code

public function getAvailableContexts() {
    return [
        'runtime_contexts' => new Context(new ContextDefinition('string', 'Do you have runtime contexts?')),
    ];
}

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