public function TestClass::onKernelResponseTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/service_provider_test/src/TestClass.php \Drupal\service_provider_test\TestClass::onKernelResponseTest()
- 9 core/modules/system/tests/modules/service_provider_test/src/TestClass.php \Drupal\service_provider_test\TestClass::onKernelResponseTest()
Flags the response in case a rebuild indicator is used.
File
- core/
modules/ system/ tests/ modules/ service_provider_test/ src/ TestClass.php, line 45
Class
Namespace
Drupal\service_provider_testCode
public function onKernelResponseTest(ResponseEvent $event) {
if ($this->container
->hasParameter('container_rebuild_indicator')) {
$event
->getResponse()->headers
->set('container_rebuild_indicator', $this->container
->getParameter('container_rebuild_indicator'));
}
if ($this->container
->hasParameter('container_rebuild_test_parameter')) {
$event
->getResponse()->headers
->set('container_rebuild_test_parameter', $this->container
->getParameter('container_rebuild_test_parameter'));
}
}