class LayoutBuilderTestPlugin
Same name in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php \Drupal\layout_builder_test\Plugin\Layout\LayoutBuilderTestPlugin
- 10 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php \Drupal\layout_builder_test\Plugin\Layout\LayoutBuilderTestPlugin
- 11.x core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutBuilderTestPlugin.php \Drupal\layout_builder_test\Plugin\Layout\LayoutBuilderTestPlugin
Plugin annotation
@Layout(
id = "layout_builder_test_plugin",
label = @Translation("Layout Builder Test Plugin"),
regions = {
"main" = {
"label" = @Translation("Main Region")
}
},
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\Core\Layout\LayoutDefault extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Layout\LayoutInterface, \Drupal\Core\Plugin\PluginFormInterface
- class \Drupal\layout_builder_test\Plugin\Layout\LayoutBuilderTestPlugin extends \Drupal\Core\Layout\LayoutDefault
- class \Drupal\Core\Layout\LayoutDefault extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Layout\LayoutInterface, \Drupal\Core\Plugin\PluginFormInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of LayoutBuilderTestPlugin
File
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Plugin/ Layout/ LayoutBuilderTestPlugin.php, line 18
Namespace
Drupal\layout_builder_test\Plugin\LayoutView source
class LayoutBuilderTestPlugin extends LayoutDefault {
/**
* {@inheritdoc}
*/
public function build(array $regions) {
$build = parent::build($regions);
$build['main']['#attributes']['class'][] = 'go-birds';
return $build;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.