ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ModeSessionRepository.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Container\Content
;
22
23
use
ilSession
;
24
29
class
ModeSessionRepository
30
{
31
protected
const
KEY
=
"cont_view"
;
32
protected
const
VIEW_ADMIN
=
"admin"
;
33
protected
const
VIEW_CONTENT
=
"content"
;
34
35
public
function
__construct
()
36
{
37
}
38
39
public
function
setAdminMode
(): void
40
{
41
ilSession::set
(self::KEY, self::VIEW_ADMIN);
42
}
43
44
public
function
setContentMode
(): void
45
{
46
ilSession::clear
(self::KEY);
47
}
48
49
public
function
isAdminMode
(): bool
50
{
51
if
(
ilSession::has
(self::KEY)) {
52
return
(
ilSession::get
(self::KEY) === self::VIEW_ADMIN);
53
}
54
return
false
;
55
}
56
57
public
function
isContentMode
(): bool
58
{
59
return
!
ilSession::has
(self::KEY);
60
}
61
}
ilSession\get
static get(string $a_var)
Definition:
class.ilSession.php:388
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\setAdminMode
setAdminMode()
Definition:
class.ModeSessionRepository.php:39
ilSession
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\KEY
const KEY
Definition:
class.ModeSessionRepository.php:31
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\__construct
__construct()
Definition:
class.ModeSessionRepository.php:35
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\isAdminMode
isAdminMode()
Definition:
class.ModeSessionRepository.php:49
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\isContentMode
isContentMode()
Definition:
class.ModeSessionRepository.php:57
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\setContentMode
setContentMode()
Definition:
class.ModeSessionRepository.php:44
ilSession\has
static has($a_var)
Definition:
class.ilSession.php:393
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\VIEW_ADMIN
const VIEW_ADMIN
Definition:
class.ModeSessionRepository.php:32
ILIAS\Container\Content
Definition:
class.BlockSequence.php:21
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository\VIEW_CONTENT
const VIEW_CONTENT
Definition:
class.ModeSessionRepository.php:33
ilSession\clear
static clear(string $a_var)
Definition:
class.ilSession.php:398
ilSession\set
static set(string $a_var, $a_val)
Set a value.
Definition:
class.ilSession.php:380
ILIAS\UI\Component\Legacy\Content\ModeSessionRepository
Stores view status.
Definition:
class.ModeSessionRepository.php:29
components
ILIAS
Container
Content
class.ModeSessionRepository.php
Generated on Sun Aug 31 2025 23:02:36 for ILIAS by
1.8.13 (using
Doxyfile
)