You are here

public function ViewsTestDataController::errorFormPage in Drupal 10

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

Renders an error form page.

This contains a form that will contain an error and an embedded view with an exposed form.

1 string reference to 'ViewsTestDataController::errorFormPage'
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/ViewsTestDataController.php, line 18

Class

ViewsTestDataController
Controller class for views_test_data callbacks.

Namespace

Drupal\views_test_data\Controller

Code

public function errorFormPage() {
  $build = [];
  $build['view'] = [
    '#type' => 'view',
    '#name' => 'test_exposed_form_buttons',
  ];
  $build['error_form'] = \Drupal::formBuilder()
    ->getForm('Drupal\\views_test_data\\Form\\ViewsTestDataErrorForm');
  return $build;
}