class TestLayoutMainFooter in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field_layout/tests/modules/field_layout_test/src/Plugin/Layout/TestLayoutMainFooter.php \Drupal\field_layout_test\Plugin\Layout\TestLayoutMainFooter
- 9 core/modules/field_layout/tests/modules/field_layout_test/src/Plugin/Layout/TestLayoutMainFooter.php \Drupal\field_layout_test\Plugin\Layout\TestLayoutMainFooter
Provides an annotated layout plugin for field_layout tests.
Plugin annotation
@Layout(
id = "test_layout_main_and_footer",
label = @Translation("Test plugin: Main and Footer"),
category = @Translation("Layout test"),
description = @Translation("Test layout"),
regions = {
"main" = {
"label" = @Translation("Main Region")
},
"footer" = {
"label" = @Translation("Footer Region")
}
},
config_dependencies = {
"module" = {
"dependency_from_annotation",
},
},
)
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\field_layout_test\Plugin\Layout\TestLayoutMainFooter
- 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 TestLayoutMainFooter
File
- core/
modules/ field_layout/ tests/ modules/ field_layout_test/ src/ Plugin/ Layout/ TestLayoutMainFooter.php, line 30
Namespace
Drupal\field_layout_test\Plugin\LayoutView source
class TestLayoutMainFooter extends LayoutDefault {
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'setting_1' => 'Default',
];
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
$dependencies['module'][] = 'dependency_from_calculateDependencies';
return $dependencies;
}
}