function BigPipeTestController::responseException

Same name and namespace in other branches
  1. 11.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::responseException()
  2. 10 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::responseException()
  3. 9 core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::responseException()
  4. 8.9.x core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php \Drupal\big_pipe_test\BigPipeTestController::responseException()

The #lazy_builder callback; returns content that will trigger an exception.

Return value

array A render array with plain text for testing BigPipe error handling.

See also

\Drupal\big_pipe_test\EventSubscriber\BigPipeTestSubscriber::onRespondTriggerException()

File

core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php, line 208

Class

BigPipeTestController
Returns responses for Big Pipe routes.

Namespace

Drupal\big_pipe_test

Code

public static function responseException() {
  return [
    '#plain_text' => BigPipeTestSubscriber::CONTENT_TRIGGER_EXCEPTION,
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.