function LegacySessionTestController::set
Stores a value in $_SESSION['legacy_test_value'].
Parameters
string $test_value: A session value.
1 string reference to 'LegacySessionTestController::set'
- session_test.routing.yml in core/
modules/ system/ tests/ modules/ session_test/ session_test.routing.yml - core/modules/system/tests/modules/session_test/session_test.routing.yml
File
-
core/
modules/ system/ tests/ modules/ session_test/ src/ Controller/ LegacySessionTestController.php, line 29
Class
- LegacySessionTestController
- Controller providing page callbacks for legacy session tests.
Namespace
Drupal\session_test\ControllerCode
public function set(string $test_value) : array {
$_SESSION['legacy_test_value'] = $test_value;
return [
'#markup' => $this->t('The current value of the stored session variable has been set to %val', [
'%val' => $test_value,
]),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.