class LayoutTestDependenciesPlugin in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php \Drupal\layout_test\Plugin\Layout\LayoutTestDependenciesPlugin
- 9 core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestDependenciesPlugin.php \Drupal\layout_test\Plugin\Layout\LayoutTestDependenciesPlugin
Provides a plugin that contains config dependencies.
Plugin annotation
@Layout(
id = "layout_test_dependencies_plugin",
label = @Translation("Layout plugin (with dependencies)"),
category = @Translation("Layout test"),
description = @Translation("Test layout"),
regions = {
"main" = {
"label" = @Translation("Main Region")
}
}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\Core\Layout\LayoutDefault implements LayoutInterface, PluginFormInterface, PreviewAwarePluginInterface uses ContextAwarePluginAssignmentTrait, ContextAwarePluginTrait
- class \Drupal\layout_test\Plugin\Layout\LayoutTestDependenciesPlugin implements DependentPluginInterface
- class \Drupal\Core\Layout\LayoutDefault implements LayoutInterface, PluginFormInterface, PreviewAwarePluginInterface uses ContextAwarePluginAssignmentTrait, ContextAwarePluginTrait
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of LayoutTestDependenciesPlugin
File
- core/
modules/ system/ tests/ modules/ layout_test/ src/ Plugin/ Layout/ LayoutTestDependenciesPlugin.php, line 23
Namespace
Drupal\layout_test\Plugin\LayoutView source
class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPluginInterface {
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
$dependencies = [];
$dependencies['config'][] = 'system.menu.my-other-menu';
return $dependencies;
}
}