3declare(strict_types=1);
39 protected \ilCtrlInterface
$ctrl;
41 protected \ILIAS\HTTP\Services
$http;
47 $this->
ctrl = $DIC->ctrl();
48 $this->wrapper =
$DIC->http()->wrapper();
49 $this->
http = $DIC->http();
51 $this->global_screen =
$DIC->globalScreen();
56 return $this->wrapper->cookie()->has(self::GS_MODE)
57 ? $this->wrapper->cookie()->retrieve(self::GS_MODE, $this->
refinery->to()->string())
68 $current_mode = $this->
getMode();
71 $cookie = $cookie_factory->create(self::GS_MODE, $new_mode)
72 ->withExpires(time() + 3600);
73 $this->
http->cookieJar()->with($cookie);
74 header(
'Location: ' .
$_SERVER[
'HTTP_REFERER']);
Class ModeToggle This is just for testing!!! And will be removed after.
ILIAS HTTP Services $http
ILIAS GlobalScreen Services $global_screen
static initILIAS()
ilias initialisation
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...