ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.CharacteristicCopyPasteSessionRepo.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\Style\Content
;
22
23
use
ilSession
;
24
use
stdClass
;
25
29
class
CharacteristicCopyPasteSessionRepo
30
{
31
protected
const
SESSION_KEY
=
"sty_copy"
;
32
33
protected
Session
$session
;
34
35
public
function
__construct
(
Session
$session = null)
36
{
37
$this->session = (
$session
)
38
?:
new
class
() implements
Session
{
39
public
function
set
(
string
$key
,
string
$value):
void
40
{
41
ilSession::set
($key, $value);
42
}
43
44
public
function
get
(
string
$key
):
string
45
{
46
return
(
string
)
ilSession::get
($key);
47
}
48
49
public
function
clear
(
string
$key):
void
50
{
51
ilSession::clear
($key);
52
}
53
};
54
}
55
59
public
function
set
(
int
$style_id,
string
$style_type, array $characteristics):
void
60
{
61
$style_cp = implode(
"::"
, $characteristics);
62
$style_cp = $style_id .
":::"
. $style_type .
":::"
. $style_cp;
63
$this->session->set(self::SESSION_KEY, $style_cp);
64
}
65
66
public
function
getData
():
stdClass
67
{
68
$st_c = explode(
":::"
, $this->
getValue
());
69
$data
=
new
stdClass
();
70
$data
->style_id = $st_c[0] ?? 0;
71
$data
->style_type = $st_c[1] ??
""
;
72
$data
->characteristics = explode(
"::"
, $st_c[2] ??
""
);
73
return
$data
;
74
}
75
76
protected
function
getValue
(): string
77
{
78
return
$this->session->get(self::SESSION_KEY);
79
}
80
81
public
function
hasEntries
(
string
$style_type): bool
82
{
83
$val = $this->
getValue
();
84
if
($val !=
""
) {
85
$style_cp = explode(
":::"
, $val);
86
if
($style_cp[1] == $style_type) {
87
return
true
;
88
}
89
}
90
return
false
;
91
}
92
93
public
function
clear
(): void
94
{
95
$this->session->clear(self::SESSION_KEY);
96
}
97
}
ilSession\get
static get(string $a_var)
Definition:
class.ilSession.php:459
$data
$data
Definition:
ltiregistration.php:31
ILIAS\Style\Content
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSession
stdClass
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\getValue
getValue()
Definition:
class.CharacteristicCopyPasteSessionRepo.php:76
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\SESSION_KEY
const SESSION_KEY
Definition:
class.CharacteristicCopyPasteSessionRepo.php:31
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\getData
getData()
Definition:
class.CharacteristicCopyPasteSessionRepo.php:66
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\hasEntries
hasEntries(string $style_type)
Definition:
class.CharacteristicCopyPasteSessionRepo.php:81
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo
Definition:
class.CharacteristicCopyPasteSessionRepo.php:29
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\$session
Session $session
Definition:
class.CharacteristicCopyPasteSessionRepo.php:33
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\clear
clear()
Definition:
class.CharacteristicCopyPasteSessionRepo.php:93
ILIAS\LTI\ToolProvider\$key
string $key
Consumer key/client ID value.
Definition:
System.php:193
ILIAS\Style\Content\CharacteristicCopyPasteSessionRepo\__construct
__construct(Session $session=null)
Definition:
class.CharacteristicCopyPasteSessionRepo.php:35
ILIAS\Style\Content\Session
Wrapper interface for session.
Definition:
interface.Session.php:28
ilSession\clear
static clear(string $a_var)
Definition:
class.ilSession.php:472
ilSession\set
static set(string $a_var, $a_val)
Set a value.
Definition:
class.ilSession.php:451
Services
Style
Content
Characteristic
class.CharacteristicCopyPasteSessionRepo.php
Generated on Tue Apr 1 2025 22:02:34 for ILIAS by
1.8.13 (using
Doxyfile
)