ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilObjTaxonomyAdministration.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
"./Services/Object/classes/class.ilObject.php"
;
5
14
class
ilObjTaxonomyAdministration
extends
ilObject
15
{
16
public
function
__construct
($a_id = 0, $a_call_by_reference =
true
)
17
{
18
global
$DIC
;
19
20
$this->tree = $DIC->repositoryTree();
21
$this->db = $DIC->database();
22
$this->type =
"taxs"
;
23
parent::__construct($a_id, $a_call_by_reference);
24
}
25
26
public
function
delete
()
27
{
28
// DISABLED
29
return
false
;
30
}
31
32
protected
function
getPath
($a_ref_id)
33
{
34
$tree
=
$this->tree
;
35
36
$res
=
array
();
37
38
foreach
(
$tree
->getPathFull($a_ref_id) as
$data
) {
39
$res
[] =
$data
[
'title'
];
40
}
41
42
return
$res
;
43
}
44
45
public
function
getRepositoryTaxonomies
()
46
{
47
$ilDB
=
$this->db
;
48
$tree
=
$this->tree
;
49
50
$res
=
array
();
51
52
include_once
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php"
;
53
54
$sql =
"SELECT oref.ref_id, od.obj_id, od.type obj_type, od.title obj_title,"
.
55
" tu.tax_id, od2.title tax_title, cs.value tax_status"
.
56
" FROM object_data od"
.
57
" JOIN object_reference oref ON (od.obj_id = oref.obj_id)"
.
58
" JOIN tax_usage tu ON (tu.obj_id = od.obj_id)"
.
59
" JOIN object_data od2 ON (od2.obj_id = tu.tax_id)"
.
60
" LEFT JOIN container_settings cs ON (cs.id = od.obj_id AND keyword = "
.
$ilDB
->quote(
ilObjectServiceSettingsGUI::TAXONOMIES
,
"text"
) .
")"
.
61
" WHERE od.type = "
.
$ilDB
->quote(
"cat"
,
"text"
) .
// categories only currently
62
" AND tu.tax_id > "
.
$ilDB
->quote(0,
"integer"
);
63
$set =
$ilDB
->query($sql);
64
while
(
$row
=
$ilDB
->fetchAssoc($set)) {
65
if
(!
$tree
->isDeleted(
$row
[
"ref_id"
])) {
66
$res
[
$row
[
"tax_id"
]][
$row
[
"obj_id"
]] =
array
(
67
"tax_id"
=> $row[
"tax_id"
]
68
,
"tax_title"
=> $row[
"tax_title"
]
69
,
"tax_status"
=> (
bool
) $row[
"tax_status"
]
70
,
"obj_title"
=> $row[
"obj_title"
]
71
,
"obj_type"
=> $row[
"obj_type"
]
72
,
"obj_id"
=> $row[
"obj_id"
]
73
,
"ref_id"
=> $row[
"ref_id"
]
74
,
"path"
=> $this->
getPath
($row[
"ref_id"
])
75
);
76
}
77
}
78
79
return
$res
;
80
}
81
}
ilObjTaxonomyAdministration
Definition:
class.ilObjTaxonomyAdministration.php:14
ilObjTaxonomyAdministration\getPath
getPath($a_ref_id)
Definition:
class.ilObjTaxonomyAdministration.php:32
ilObject
$DIC
global $DIC
Definition:
saml.php:7
ilObjectServiceSettingsGUI\TAXONOMIES
const TAXONOMIES
Definition:
class.ilObjectServiceSettingsGUI.php:31
ilObject\$tree
$tree
Definition:
class.ilObject.php:38
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$data
$data
Definition:
test-settings.sample.php:14
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilObjTaxonomyAdministration\getRepositoryTaxonomies
getRepositoryTaxonomies()
Definition:
class.ilObjTaxonomyAdministration.php:45
ilObjTaxonomyAdministration\__construct
__construct($a_id=0, $a_call_by_reference=true)
Definition:
class.ilObjTaxonomyAdministration.php:16
$row
$row
Definition:
10autofilter-selection-1.php:74
ilObject\$db
$db
Definition:
class.ilObject.php:23
Services
Taxonomy
classes
class.ilObjTaxonomyAdministration.php
Generated on Sat Jan 18 2025 19:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)