public function BasicAuthTestController::readState in Drupal 8
Same name and namespace in other branches
- 9 core/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php \Drupal\basic_auth_test\BasicAuthTestController::readState()
See also
\Drupal\basic_auth\Tests\Authentication\BasicAuthTest::testControllerNotCalledBeforeAuth()
1 string reference to 'BasicAuthTestController::readState'
- basic_auth_test.routing.yml in core/
modules/ basic_auth/ tests/ modules/ basic_auth_test/ basic_auth_test.routing.yml - core/modules/basic_auth/tests/modules/basic_auth_test/basic_auth_test.routing.yml
File
- core/
modules/ basic_auth/ tests/ modules/ basic_auth_test/ src/ BasicAuthTestController.php, line 18
Class
Namespace
Drupal\basic_auth_testCode
public function readState() {
// Mark this page as being uncacheable.
\Drupal::service('page_cache_kill_switch')
->trigger();
return [
'#markup' => \Drupal::state()
->get('basic_auth_test.state.controller_executed') ? 'yep' : 'nope',
'#cache' => [
'max-age' => 0,
],
];
}