ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Container\Content\ModeSessionRepository Class Reference

Stores view status. More...

+ Collaboration diagram for ILIAS\Container\Content\ModeSessionRepository:

Public Member Functions

 __construct ()
 
 setAdminMode ()
 
 setContentMode ()
 
 isAdminMode ()
 
 isContentMode ()
 

Protected Attributes

const KEY = "cont_view"
 
const VIEW_ADMIN = "admin"
 
const VIEW_CONTENT = "content"
 

Detailed Description

Stores view status.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 29 of file class.ModeSessionRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Container\Content\ModeSessionRepository::__construct ( )

Definition at line 35 of file class.ModeSessionRepository.php.

36 {
37 }

Member Function Documentation

◆ isAdminMode()

ILIAS\Container\Content\ModeSessionRepository::isAdminMode ( )

Definition at line 49 of file class.ModeSessionRepository.php.

49 : bool
50 {
51 if (ilSession::has(self::KEY)) {
52 return (ilSession::get(self::KEY) === self::VIEW_ADMIN);
53 }
54 return false;
55 }
static get(string $a_var)
static has($a_var)

References ilSession\get(), and ilSession\has().

+ Here is the call graph for this function:

◆ isContentMode()

ILIAS\Container\Content\ModeSessionRepository::isContentMode ( )

Definition at line 57 of file class.ModeSessionRepository.php.

57 : bool
58 {
59 return !ilSession::has(self::KEY);
60 }

References ilSession\has().

+ Here is the call graph for this function:

◆ setAdminMode()

ILIAS\Container\Content\ModeSessionRepository::setAdminMode ( )

Definition at line 39 of file class.ModeSessionRepository.php.

39 : void
40 {
41 ilSession::set(self::KEY, self::VIEW_ADMIN);
42 }
static set(string $a_var, $a_val)
Set a value.

References ilSession\set().

+ Here is the call graph for this function:

◆ setContentMode()

ILIAS\Container\Content\ModeSessionRepository::setContentMode ( )

Definition at line 44 of file class.ModeSessionRepository.php.

44 : void
45 {
46 ilSession::clear(self::KEY);
47 }
static clear(string $a_var)

References ilSession\clear().

+ Here is the call graph for this function:

Field Documentation

◆ KEY

const ILIAS\Container\Content\ModeSessionRepository::KEY = "cont_view"
protected

Definition at line 31 of file class.ModeSessionRepository.php.

◆ VIEW_ADMIN

const ILIAS\Container\Content\ModeSessionRepository::VIEW_ADMIN = "admin"
protected

Definition at line 32 of file class.ModeSessionRepository.php.

◆ VIEW_CONTENT

const ILIAS\Container\Content\ModeSessionRepository::VIEW_CONTENT = "content"
protected

Definition at line 33 of file class.ModeSessionRepository.php.


The documentation for this class was generated from the following file: