ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilOrgUnitObjectPositionSetting.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11
class
ilOrgUnitObjectPositionSetting
12
{
13
17
protected
$db
;
21
private
$obj_id
;
25
private
$active
;
26
27
33
public
function
__construct
($a_obj_id)
34
{
35
$this->db =
$GLOBALS
[
'DIC'
]->database();
36
$this->obj_id = $a_obj_id;
37
$this->
readSettings
();
38
}
39
40
48
public
function
lookupActive
($a_obj_id)
49
{
50
$db
=
$GLOBALS
[
'DIC'
]->database();
51
52
$query
=
'select * from orgu_obj_pos_settings '
.
'where obj_id = '
53
.
$db
->quote($a_obj_id,
'integer'
);
54
$res
= $this->db->query(
$query
);
55
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
56
return
(
bool
)
$row
->active;
57
}
58
}
59
60
66
public
function
isActive
()
67
{
68
return
$this->active
;
69
}
70
71
77
public
function
setActive
($a_status)
78
{
79
$this->active = $a_status;
80
}
81
82
86
public
function
update
()
87
{
88
$this->db->replace(
'orgu_obj_pos_settings'
, [
89
'obj_id'
=> [
'integer'
, $this->obj_id ],
90
], [
91
'active'
=> [
'integer'
, (
int
) $this->
isActive
() ],
92
]);
93
}
94
95
99
public
function
delete
()
100
{
101
$query
=
'DELETE from orgu_obj_pos_settings '
.
'WHERE obj_id = '
102
. $this->db->quote($this->obj_id,
'integer'
);
103
$this->db->manipulate(
$query
);
104
}
105
106
111
public
function
hasObjectSpecificActivation
()
112
{
113
return
$this->active !== null;
114
}
115
116
120
protected
function
readSettings
()
121
{
122
if
(!$this->obj_id) {
123
return
;
124
}
125
$query
=
'select * from orgu_obj_pos_settings '
.
'where obj_id = '
126
. $this->db->quote($this->obj_id,
'integer'
);
127
$res
= $this->db->query(
$query
);
128
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
129
$this->active = (bool)
$row
->active;
130
}
131
132
return
;
133
}
134
}
ilOrgUnitObjectPositionSetting\setActive
setActive($a_status)
Set active for object.
Definition:
class.ilOrgUnitObjectPositionSetting.php:77
ilOrgUnitObjectPositionSetting
Stores object activation status of orgunit position settings.
Definition:
class.ilOrgUnitObjectPositionSetting.php:11
ilOrgUnitObjectPositionSetting\$active
$active
Definition:
class.ilOrgUnitObjectPositionSetting.php:25
$GLOBALS
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Definition:
generate-standalone.php:18
ilOrgUnitObjectPositionSetting\lookupActive
lookupActive($a_obj_id)
Lookup activation status.
Definition:
class.ilOrgUnitObjectPositionSetting.php:48
ilOrgUnitObjectPositionSetting\update
update()
Update object entry.
Definition:
class.ilOrgUnitObjectPositionSetting.php:86
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilOrgUnitObjectPositionSetting\$obj_id
$obj_id
Definition:
class.ilOrgUnitObjectPositionSetting.php:21
$query
$query
Definition:
proxy_ylocal.php:13
ilOrgUnitObjectPositionSetting\hasObjectSpecificActivation
hasObjectSpecificActivation()
Definition:
class.ilOrgUnitObjectPositionSetting.php:111
ilOrgUnitObjectPositionSetting\isActive
isActive()
Check if position access is active.
Definition:
class.ilOrgUnitObjectPositionSetting.php:66
ilOrgUnitObjectPositionSetting\readSettings
readSettings()
Read from db.
Definition:
class.ilOrgUnitObjectPositionSetting.php:120
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
$row
$row
Definition:
10autofilter-selection-1.php:74
ilOrgUnitObjectPositionSetting\__construct
__construct($a_obj_id)
Constructor.
Definition:
class.ilOrgUnitObjectPositionSetting.php:33
ilOrgUnitObjectPositionSetting\$db
$db
Definition:
class.ilOrgUnitObjectPositionSetting.php:17
Modules
OrgUnit
classes
Settings
class.ilOrgUnitObjectPositionSetting.php
Generated on Sat Jan 18 2025 19:01:18 for ILIAS by
1.8.13 (using
Doxyfile
)