ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
class.EditSessionRepository.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\COPage\Editor
;
20
26
class
EditSessionRepository
27
{
28
protected
const
BASE_SESSION_KEY
=
'copg_'
;
29
protected
const
ERROR_KEY
= self::BASE_SESSION_KEY .
'error'
;
30
protected
const
SUB_CMD_KEY
= self::BASE_SESSION_KEY .
'sub_cmd'
;
31
protected
const
TXT_LANG_KEY
= self::BASE_SESSION_KEY .
'text_lang'
;
32
protected
const
MEP_KEY
= self::BASE_SESSION_KEY .
'mep'
;
33
protected
const
QPL_KEY
= self::BASE_SESSION_KEY .
'qpl'
;
34
35
public
function
__construct
()
36
{
37
}
38
39
public
function
clear
(?array $text_ref_ids =
null
): void
40
{
41
$this->
clearPageError
();
42
$this->
clearMediaPool
();
43
$this->
clearQuestionPool
();
44
$this->
clearSubCmd
();
45
if
(is_array($text_ref_ids)) {
46
foreach
($text_ref_ids as $text_ref_id) {
47
$this->
clearTextLang
($text_ref_id);
48
}
49
}
50
}
51
52
public
function
clearPageError
(): void
53
{
54
\ilSession::clear
(self::ERROR_KEY);
55
}
56
60
public
function
setPageError
(
$error
): void
61
{
62
\ilSession::set
(self::ERROR_KEY,
$error
);
63
}
64
65
public
function
getPageError
(): string|array
66
{
67
return \ilSession::get
(self::ERROR_KEY) ??
""
;
68
}
69
70
public
function
clearSubCmd
(): void
71
{
72
\ilSession::clear
(self::SUB_CMD_KEY);
73
}
74
75
public
function
setSubCmd
(
string
$sub_cmd): void
76
{
77
\ilSession::set
(self::SUB_CMD_KEY, $sub_cmd);
78
}
79
80
public
function
getSubCmd
(): string
81
{
82
return \ilSession::get
(self::SUB_CMD_KEY) ??
""
;
83
}
84
85
public
function
clearTextLang
(
int
$ref_id
): void
86
{
87
\ilSession::clear
(self::TXT_LANG_KEY .
"_"
.
$ref_id
);
88
}
89
90
public
function
setTextLang
(
int
$ref_id
,
string
$lang_key): void
91
{
92
\ilSession::set
(self::TXT_LANG_KEY .
"_"
.
$ref_id
, $lang_key);
93
}
94
95
public
function
getTextLang
(
int
$ref_id
): string
96
{
97
return \ilSession::get
(self::TXT_LANG_KEY .
"_"
.
$ref_id
) ??
""
;
98
}
99
100
public
function
clearMediaPool
(): void
101
{
102
\ilSession::clear
(self::MEP_KEY);
103
}
104
105
public
function
setMediaPool
(
int
$pool_id): void
106
{
107
\ilSession::set
(self::MEP_KEY, $pool_id);
108
}
109
110
public
function
getMediaPool
():
int
111
{
112
return \ilSession::get
(self::MEP_KEY) ?? 0;
113
}
114
115
public
function
clearQuestionPool
(): void
116
{
117
\ilSession::clear
(self::QPL_KEY);
118
}
119
120
public
function
setQuestionPool
(
int
$pool_id): void
121
{
122
\ilSession::set
(self::QPL_KEY, $pool_id);
123
}
124
125
public
function
getQuestionPool
():
int
126
{
127
return \ilSession::get
(self::QPL_KEY) ?? 0;
128
}
129
}
ILIAS\COPage\Editor\EditSessionRepository
Editing session repository.
Definition:
class.EditSessionRepository.php:27
ILIAS\COPage\Editor\EditSessionRepository\getQuestionPool
getQuestionPool()
Definition:
class.EditSessionRepository.php:125
ILIAS\COPage\Editor\EditSessionRepository\getMediaPool
getMediaPool()
Definition:
class.EditSessionRepository.php:110
ILIAS\COPage\Editor\EditSessionRepository\clear
clear(?array $text_ref_ids=null)
Definition:
class.EditSessionRepository.php:39
ILIAS\COPage\Editor\EditSessionRepository\getTextLang
getTextLang(int $ref_id)
Definition:
class.EditSessionRepository.php:95
ILIAS\COPage\Editor\EditSessionRepository\clearMediaPool
clearMediaPool()
Definition:
class.EditSessionRepository.php:100
ILIAS\COPage\Editor\EditSessionRepository\setQuestionPool
setQuestionPool(int $pool_id)
Definition:
class.EditSessionRepository.php:120
ILIAS\COPage\Editor\EditSessionRepository\clearQuestionPool
clearQuestionPool()
Definition:
class.EditSessionRepository.php:115
ILIAS\COPage\Editor\EditSessionRepository\clearTextLang
clearTextLang(int $ref_id)
Definition:
class.EditSessionRepository.php:85
ILIAS\COPage\Editor\EditSessionRepository\QPL_KEY
const QPL_KEY
Definition:
class.EditSessionRepository.php:33
ILIAS\COPage\Editor\EditSessionRepository\BASE_SESSION_KEY
const BASE_SESSION_KEY
Definition:
class.EditSessionRepository.php:28
ILIAS\COPage\Editor\EditSessionRepository\clearPageError
clearPageError()
Definition:
class.EditSessionRepository.php:52
ILIAS\COPage\Editor\EditSessionRepository\MEP_KEY
const MEP_KEY
Definition:
class.EditSessionRepository.php:32
ILIAS\COPage\Editor\EditSessionRepository\__construct
__construct()
Definition:
class.EditSessionRepository.php:35
ILIAS\COPage\Editor\EditSessionRepository\clearSubCmd
clearSubCmd()
Definition:
class.EditSessionRepository.php:70
ILIAS\COPage\Editor\EditSessionRepository\ERROR_KEY
const ERROR_KEY
Definition:
class.EditSessionRepository.php:29
ILIAS\COPage\Editor\EditSessionRepository\getPageError
getPageError()
Definition:
class.EditSessionRepository.php:65
ILIAS\COPage\Editor\EditSessionRepository\getSubCmd
getSubCmd()
Definition:
class.EditSessionRepository.php:80
ILIAS\COPage\Editor\EditSessionRepository\setMediaPool
setMediaPool(int $pool_id)
Definition:
class.EditSessionRepository.php:105
ILIAS\COPage\Editor\EditSessionRepository\TXT_LANG_KEY
const TXT_LANG_KEY
Definition:
class.EditSessionRepository.php:31
ILIAS\COPage\Editor\EditSessionRepository\SUB_CMD_KEY
const SUB_CMD_KEY
Definition:
class.EditSessionRepository.php:30
ILIAS\COPage\Editor\EditSessionRepository\setSubCmd
setSubCmd(string $sub_cmd)
Definition:
class.EditSessionRepository.php:75
ILIAS\COPage\Editor\EditSessionRepository\setTextLang
setTextLang(int $ref_id, string $lang_key)
Definition:
class.EditSessionRepository.php:90
ILIAS\COPage\Editor\EditSessionRepository\setPageError
setPageError($error)
Definition:
class.EditSessionRepository.php:60
ILIAS\$error
ilErrorHandling $error
Definition:
class.ilias.php:69
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
$ref_id
$ref_id
Definition:
ltiauth.php:66
ILIAS\COPage\Editor
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.EditSessionRepository.php:19
ILIAS\GlobalScreen\get
get(string $class_name)
Definition:
SingletonTrait.php:33
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
COPage
Editor
class.EditSessionRepository.php
Generated on Sat Dec 13 2025 23:02:07 for ILIAS by
1.9.4 (using
Doxyfile
)