function FakeViewModeContext::getRuntimeContexts
Same name in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/ContextProvider/FakeViewModeContext.php \Drupal\layout_builder_fieldblock_test\ContextProvider\FakeViewModeContext::getRuntimeContexts()
- 10 core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/ContextProvider/FakeViewModeContext.php \Drupal\layout_builder_fieldblock_test\ContextProvider\FakeViewModeContext::getRuntimeContexts()
- 11.x core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/ContextProvider/FakeViewModeContext.php \Drupal\layout_builder_fieldblock_test\ContextProvider\FakeViewModeContext::getRuntimeContexts()
Overrides ContextProviderInterface::getRuntimeContexts
1 call to FakeViewModeContext::getRuntimeContexts()
- FakeViewModeContext::getAvailableContexts in core/
modules/ layout_builder/ tests/ modules/ layout_builder_fieldblock_test/ src/ ContextProvider/ FakeViewModeContext.php - Gets all available contexts for the purposes of configuration.
File
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_fieldblock_test/ src/ ContextProvider/ FakeViewModeContext.php, line 19
Class
- FakeViewModeContext
- Provides a global context for view_mode for testing purposes.
Namespace
Drupal\layout_builder_fieldblock_test\ContextProviderCode
public function getRuntimeContexts(array $unqualified_context_ids) {
return [
'view_mode' => new Context(new ContextDefinition('string'), 'default'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.