public function TabbingManagerTestController::build in Drupal 10
Provides a page with the tabbingManager library for testing tabbing manager.
Return value
array The render array.
1 string reference to 'TabbingManagerTestController::build'
- tabbingmanager_test.routing.yml in core/
modules/ system/ tests/ modules/ tabbingmanager_test/ tabbingmanager_test.routing.yml - core/modules/system/tests/modules/tabbingmanager_test/tabbingmanager_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ tabbingmanager_test/ src/ Controller/ TabbingManagerTestController.php, line 18
Class
- TabbingManagerTestController
- For testing the Tabbing Manager.
Namespace
Drupal\tabbingmanager_test\ControllerCode
public function build() {
return [
'container' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tabbingmanager-test-container',
],
'first' => [
'#type' => 'textfield',
'#title' => $this
->t('First'),
'#attributes' => [
'id' => 'first',
],
],
'second' => [
'#type' => 'textfield',
'#title' => $this
->t('Second'),
'#attributes' => [
'id' => 'second',
],
],
'third' => [
'#type' => 'textfield',
'#title' => $this
->t('Third'),
'#attributes' => [
'id' => 'third',
],
],
],
'another_container' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tabbingmanager-test-another-container',
],
'fourth' => [
'#type' => 'textfield',
'#title' => $this
->t('Fourth'),
'#attributes' => [
'id' => 'fourth',
],
],
'fifth' => [
'#type' => 'textfield',
'#title' => $this
->t('Fifth'),
'#attributes' => [
'id' => 'fifth',
],
],
'sixth' => [
'#type' => 'textfield',
'#title' => $this
->t('Sixth'),
'#attributes' => [
'id' => 'sixth',
],
],
],
'#attached' => [
'library' => [
'core/drupal.tabbingmanager',
],
],
];
}