ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilObjWorkspaceRootFolder.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
require_once
"Services/Object/classes/class.ilObject2.php"
;
6
15
class
ilObjWorkspaceRootFolder
extends
ilObjWorkspaceFolder
16
{
17
21
public
function
__construct
($a_id = 0, $a_reference =
true
)
22
{
23
global
$DIC
;
24
parent::__construct
($a_id, $a_reference);
25
26
$this->db = $DIC->database();
27
}
28
29
public
function
initType
()
30
{
31
$this->type =
"wsrt"
;
32
}
33
40
public
function
getTranslations
()
41
{
42
$ilDB
=
$this->db
;
43
44
$q =
"SELECT * FROM object_translation WHERE obj_id = "
.
45
$ilDB
->quote($this->
getId
(),
'integer'
) .
" ORDER BY lang_default DESC"
;
46
$r =
$ilDB
->query($q);
47
48
$num = 0;
49
50
$data
[
"Fobject"
] = array();
51
while
($row = $r->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
52
$data
[
"Fobject"
][$num] = array(
"title"
=> $row->title,
53
"desc"
=> $row->description,
54
"lang"
=> $row->lang_code
55
);
56
$num++;
57
}
58
59
// first entry is always the default language
60
$data
[
"default_language"
] = 0;
61
62
return
$data
?
$data
: array();
63
}
64
65
// remove all Translations of current category
66
public
function
removeTranslations
()
67
{
68
$ilDB
=
$this->db
;
69
70
$query
=
"DELETE FROM object_translation WHERE obj_id= "
.
71
$ilDB
->quote($this->
getId
(),
'integer'
);
72
$res
=
$ilDB
->manipulate(
$query
);
73
}
74
75
// add a new translation to current category
76
public
function
addTranslation
($a_title, $a_desc, $a_lang, $a_lang_default)
77
{
78
$ilDB
=
$this->db
;
79
80
if
(empty($a_title)) {
81
$a_title =
"NO TITLE"
;
82
}
83
84
$query
=
"INSERT INTO object_translation "
.
85
"(obj_id,title,description,lang_code,lang_default) "
.
86
"VALUES "
.
87
"("
.
$ilDB
->quote($this->
getId
(),
'integer'
) .
","
.
88
$ilDB
->quote($a_title,
'text'
) .
","
.
89
$ilDB
->quote($a_desc,
'text'
) .
","
.
90
$ilDB
->quote($a_lang,
'text'
) .
","
.
91
$ilDB
->quote($a_lang_default,
'integer'
) .
")"
;
92
$res
=
$ilDB
->manipulate(
$query
);
93
return
true
;
94
}
95
}
// END class.ObjRootFolder
$data
$data
Definition:
storeScorm.php:23
ilObjWorkspaceRootFolder\initType
initType()
Definition:
class.ilObjWorkspaceRootFolder.php:29
ilObjWorkspaceRootFolder\removeTranslations
removeTranslations()
Definition:
class.ilObjWorkspaceRootFolder.php:66
ilObjWorkspaceRootFolder\__construct
__construct($a_id=0, $a_reference=true)
Constructor.
Definition:
class.ilObjWorkspaceRootFolder.php:21
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilObject\getId
getId()
get object id public
Definition:
class.ilObject.php:319
ilObjWorkspaceRootFolder\addTranslation
addTranslation($a_title, $a_desc, $a_lang, $a_lang_default)
Definition:
class.ilObjWorkspaceRootFolder.php:76
$DIC
global $DIC
Definition:
goto.php:24
ilObjWorkspaceRootFolder
Class ilObjWorkspaceRootFolder.
Definition:
class.ilObjWorkspaceRootFolder.php:15
$query
$query
Definition:
proxy_ylocal.php:13
ilObjWorkspaceFolder
Class ilObjWorkspaceFolder.
Definition:
class.ilObjWorkspaceFolder.php:15
ilObjWorkspaceRootFolder\getTranslations
getTranslations()
get all translations from this category
Definition:
class.ilObjWorkspaceRootFolder.php:40
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:40
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:11
ilObject\$db
$db
Definition:
class.ilObject.php:23
Modules
WorkspaceRootFolder
classes
class.ilObjWorkspaceRootFolder.php
Generated on Mon Apr 7 2025 21:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)