class BasicAuthTestController in Drupal 10
Same name and namespace in other branches
- 8 core/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php \Drupal\basic_auth_test\BasicAuthTestController
- 9 core/modules/basic_auth/tests/modules/basic_auth_test/src/BasicAuthTestController.php \Drupal\basic_auth_test\BasicAuthTestController
Hierarchy
- class \Drupal\basic_auth_test\BasicAuthTestController
Expanded class hierarchy of BasicAuthTestController
File
- core/
modules/ basic_auth/ tests/ modules/ basic_auth_test/ src/ BasicAuthTestController.php, line 5
Namespace
Drupal\basic_auth_testView source
class BasicAuthTestController {
/**
* @see \Drupal\basic_auth\Tests\Authentication\BasicAuthTest::testControllerNotCalledBeforeAuth()
*/
public function modifyState() {
\Drupal::state()
->set('basic_auth_test.state.controller_executed', TRUE);
return [
'#markup' => 'Done',
];
}
/**
* @see \Drupal\basic_auth\Tests\Authentication\BasicAuthTest::testControllerNotCalledBeforeAuth()
*/
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,
],
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BasicAuthTestController:: |
public | function | ||
BasicAuthTestController:: |
public | function |