You are here

public function ViewsTestFormMultipleController::testPage in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestFormMultipleController.php \Drupal\views_test_data\Controller\ViewsTestFormMultipleController::testPage()

Returns a test page having test_form_multiple view embedded twice.

1 string reference to 'ViewsTestFormMultipleController::testPage'
views_test_data.routing.yml in core/modules/views/tests/modules/views_test_data/views_test_data.routing.yml
core/modules/views/tests/modules/views_test_data/views_test_data.routing.yml

File

core/modules/views/tests/modules/views_test_data/src/Controller/ViewsTestFormMultipleController.php, line 15

Class

ViewsTestFormMultipleController
Controller routines for views form multiple test routes.

Namespace

Drupal\views_test_data\Controller

Code

public function testPage() {
  $build = [
    'view_arg1' => [
      '#prefix' => '<div class="view-test-form-multiple-1">',
      '#suffix' => '</div>',
      '#type' => 'view',
      '#name' => 'test_form_multiple',
      '#display_id' => 'default',
      '#arguments' => [
        'arg1',
      ],
      '#embed' => TRUE,
    ],
    'view_arg2' => [
      '#prefix' => '<div class="view-test-form-multiple-2">',
      '#suffix' => '</div>',
      '#type' => 'view',
      '#name' => 'test_form_multiple',
      '#display_id' => 'default',
      '#arguments' => [
        'arg2',
      ],
      '#embed' => TRUE,
    ],
  ];
  return $build;
}