19 declare(strict_types=1);
62 $this->ctrl = $DIC->ctrl();
63 $this->wrapper = $DIC->http()->wrapper();
64 $this->
http = $DIC->http();
65 $this->refinery = $DIC->refinery();
66 $this->global_screen = $DIC->globalScreen();
71 return $this->wrapper->cookie()->has(self::GS_MODE)
72 ? $this->wrapper->cookie()->retrieve(self::GS_MODE, $this->refinery->to()->string())
83 $current_mode = $this->
getMode();
84 $new_mode = $current_mode == self::MODE1 ? self::MODE2 : self::MODE1;
86 $cookie = $cookie_factory->create(self::GS_MODE, $new_mode)
87 ->withExpires(time() + 3600);
88 $this->
http->cookieJar()->with($cookie);
89 header(
'Location: ' .
$_SERVER[
'HTTP_REFERER']);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initILIAS()
ilias initialisation
static http()
Fetches the global http state from ILIAS.
Class ModeToggle This is just for testing!!! And will be removed after.