19declare(strict_types=1);
22use ILIAS\HTTP\Wrapper\WrapperFactory;
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();
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']);
An exception for terminatinating execution or to throw for unit testing.
Class ModeToggle This is just for testing!!! And will be removed after.
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...