public function SessionTestController::set in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/session_test/src/Controller/SessionTestController.php \Drupal\session_test\Controller\SessionTestController::set()
Stores a value in $_SESSION['session_test_value'].
Parameters
string $test_value: A session value.
Return value
string A notification message.
1 call to SessionTestController::set()
- SessionTestController::noSet in core/
modules/ system/ tests/ modules/ session_test/ src/ Controller/ SessionTestController.php - Turns off session saving and then tries to save a value anyway.
1 string reference to 'SessionTestController::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/ SessionTestController.php, line 89 - Contains \Drupal\session_test\Controller\SessionTestController.
Class
- SessionTestController
- Controller providing page callbacks for the action admin interface.
Namespace
Drupal\session_test\ControllerCode
public function set($test_value) {
$_SESSION['session_test_value'] = $test_value;
return [
'#markup' => $this
->t('The current value of the stored session variable has been set to %val', array(
'%val' => $test_value,
)),
];
}