ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilECSNodeMappingAssignment Class Reference
+ Collaboration diagram for ilECSNodeMappingAssignment:

Public Member Functions

 __construct ($a_server_id, $mid, $cs_root, $cs_id)
 Constructor. More...
 
 isMapped ()
 
 getServerId ()
 
 setServerId ($a_id)
 
 setMemberId ($a_member_id)
 
 getMemberId ()
 
 getTreeId ()
 
 setTreeId ($root)
 
 getCSId ()
 
 setCSId ($id)
 
 getRefId ()
 
 setRefId ($a_id)
 
 getObjId ()
 
 setObjId ($id)
 
 isTitleUpdateEnabled ()
 
 enableTitleUpdate ($enabled)
 
 isPositionUpdateEnabled ()
 
 enablePositionUpdate ($enabled)
 
 isTreeUpdateEnabled ()
 
 enableTreeUpdate ($enabled)
 
 update ()
 Update node mapping. More...
 
 create ()
 
 delete ()
 Delete entry @global ilDB $ilDB. More...
 

Static Public Member Functions

static deleteByServerId ($a_server_id)
 

Protected Member Functions

 read ()
 read settings @global ilDB $ilDB More...
 

Private Attributes

 $server_id
 
 $mid
 
 $cs_root
 
 $cs_id
 
 $ref_id
 
 $obj_id
 
 $title_update = false
 
 $position_update = false
 
 $tree_update = false
 
 $mapped = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilECSNodeMappingAssignment::__construct (   $a_server_id,
  $mid,
  $cs_root,
  $cs_id 
)

Constructor.

Definition at line 28 of file class.ilECSNodeMappingAssignment.php.

29 {
30 $this->server_id = $a_server_id;
31 $this->mid = $mid;
32 $this->cs_root = $cs_root;
33 $this->cs_id = $cs_id;
34
35 $this->read();
36 }
read()
read settings @global ilDB $ilDB

References $cs_id, $cs_root, $mid, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilECSNodeMappingAssignment::create ( )

Definition at line 145 of file class.ilECSNodeMappingAssignment.php.

146 {
147 global $ilDB;
148
149 $query = 'INSERT INTO ecs_node_mapping_a (server_id,mid,cs_root,cs_id,ref_id,obj_id,title_update,position_update,tree_update) '.
150 'VALUES( '.
151 $ilDB->quote($this->getServerId(),'integer').', '.
152 $ilDB->quote($this->getMemberId(),'integer').', '.
153 $ilDB->quote($this->getTreeId(),'integer').', '.
154 $ilDB->quote($this->getCSId(),'integer').', '.
155 $ilDB->quote($this->getRefId(),'integer').', '.
156 $ilDB->quote($this->getObjId(),'integer').', '.
157 $ilDB->quote($this->isTitleUpdateEnabled(),'integer').', '.
158 $ilDB->quote($this->isPositionUpdateEnabled(),'integer').', '.
159 $ilDB->quote($this->isTreeUpdateEnabled(),'integer').' '.
160 ')';
161 $ilDB->manipulate($query);
162 return true;
163
164 }
global $ilDB

References $ilDB, $query, getCSId(), getMemberId(), getObjId(), getRefId(), getServerId(), getTreeId(), isPositionUpdateEnabled(), isTitleUpdateEnabled(), and isTreeUpdateEnabled().

Referenced by update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilECSNodeMappingAssignment::delete ( )

Delete entry @global ilDB $ilDB.

Definition at line 171 of file class.ilECSNodeMappingAssignment.php.

172 {
173 global $ilDB;
174
175 $query = 'DELETE FROM ecs_node_mapping_a '.
176 'WHERE server_id = '.$ilDB->quote($this->getServerId(),'integer'). ' '.
177 'AND mid = '.$ilDB->quote($this->getMemberId(),'integer'). ' '.
178 'AND cs_root = '.$ilDB->quote($this->getTreeId(),'integer').' '.
179 'AND cs_id = '.$ilDB->quote($this->getCSId(),'integer');
180 $ilDB->manipulate($query);
181 }

References $ilDB, $query, and getServerId().

+ Here is the call graph for this function:

◆ deleteByServerId()

static ilECSNodeMappingAssignment::deleteByServerId (   $a_server_id)
static

Definition at line 213 of file class.ilECSNodeMappingAssignment.php.

214 {
215 global $ilDB;
216
217 $query = 'DELETE FROM ecs_node_mapping_a'.
218 ' WHERE server_id = '.$ilDB->quote($a_server_id,'integer');
219 $ilDB->manipulate($query);
220 return true;
221 }

References $ilDB, and $query.

Referenced by ilECSSetting\delete().

+ Here is the caller graph for this function:

◆ enablePositionUpdate()

ilECSNodeMappingAssignment::enablePositionUpdate (   $enabled)

Definition at line 118 of file class.ilECSNodeMappingAssignment.php.

119 {
120 $this->position_update = $enabled;
121 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableTitleUpdate()

ilECSNodeMappingAssignment::enableTitleUpdate (   $enabled)

Definition at line 108 of file class.ilECSNodeMappingAssignment.php.

109 {
110 $this->title_update = $enabled;
111 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableTreeUpdate()

ilECSNodeMappingAssignment::enableTreeUpdate (   $enabled)

Definition at line 128 of file class.ilECSNodeMappingAssignment.php.

129 {
130 $this->tree_update = $enabled;
131 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getCSId()

ilECSNodeMappingAssignment::getCSId ( )

Definition at line 73 of file class.ilECSNodeMappingAssignment.php.

74 {
75 return $this->cs_id;
76 }

References $cs_id.

Referenced by create(), read(), and ilECSCmsTreeSynchronizer\syncCategory().

+ Here is the caller graph for this function:

◆ getMemberId()

ilECSNodeMappingAssignment::getMemberId ( )

Definition at line 58 of file class.ilECSNodeMappingAssignment.php.

59 {
60 return $this->mid;
61 }

References $mid.

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ getObjId()

ilECSNodeMappingAssignment::getObjId ( )

Definition at line 93 of file class.ilECSNodeMappingAssignment.php.

References $obj_id.

Referenced by create().

+ Here is the caller graph for this function:

◆ getRefId()

ilECSNodeMappingAssignment::getRefId ( )

Definition at line 83 of file class.ilECSNodeMappingAssignment.php.

References $ref_id.

Referenced by create().

+ Here is the caller graph for this function:

◆ getServerId()

ilECSNodeMappingAssignment::getServerId ( )

Definition at line 43 of file class.ilECSNodeMappingAssignment.php.

References $server_id.

Referenced by create(), delete(), and read().

+ Here is the caller graph for this function:

◆ getTreeId()

ilECSNodeMappingAssignment::getTreeId ( )

Definition at line 63 of file class.ilECSNodeMappingAssignment.php.

64 {
65 return $this->cs_root;
66 }

References $cs_root.

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ isMapped()

ilECSNodeMappingAssignment::isMapped ( )

◆ isPositionUpdateEnabled()

ilECSNodeMappingAssignment::isPositionUpdateEnabled ( )

Definition at line 113 of file class.ilECSNodeMappingAssignment.php.

References $position_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ isTitleUpdateEnabled()

ilECSNodeMappingAssignment::isTitleUpdateEnabled ( )

Definition at line 103 of file class.ilECSNodeMappingAssignment.php.

References $title_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ isTreeUpdateEnabled()

ilECSNodeMappingAssignment::isTreeUpdateEnabled ( )

Definition at line 123 of file class.ilECSNodeMappingAssignment.php.

References $tree_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ read()

ilECSNodeMappingAssignment::read ( )
protected

read settings @global ilDB $ilDB

Definition at line 189 of file class.ilECSNodeMappingAssignment.php.

190 {
191 global $ilDB;
192
193 $query = 'SELECT * FROM ecs_node_mapping_a '.
194 'WHERE server_id = '.$ilDB->quote($this->getServerId(), 'integer').' '.
195 'AND mid = '.$ilDB->quote($this->getMemberId(),'integer'). ' '.
196 'AND cs_root = '.$ilDB->quote($this->getTreeId(), 'integer').' '.
197 'AND cs_id = '.$ilDB->quote($this->getCSId(), 'integer').' ';
198 $res = $ilDB->query($query);
199
200 #$GLOBALS['ilLog']->write(__METHOD__.': '.$query);
201
202 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
203 {
204 $this->setObjId($row->obj_id);
205 $this->setRefId($row->ref_id);
206 $this->enableTitleUpdate($row->title_update);
207 $this->enablePositionUpdate($row->position_update);
208 $this->enableTreeUpdate($row->tree_update);
209 $this->mapped = true;
210 }
211 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, enablePositionUpdate(), enableTitleUpdate(), enableTreeUpdate(), getCSId(), getMemberId(), getServerId(), getTreeId(), setObjId(), and setRefId().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCSId()

ilECSNodeMappingAssignment::setCSId (   $id)

Definition at line 78 of file class.ilECSNodeMappingAssignment.php.

79 {
80 $this->cs_id = $id;
81 }

◆ setMemberId()

ilECSNodeMappingAssignment::setMemberId (   $a_member_id)

Definition at line 53 of file class.ilECSNodeMappingAssignment.php.

54 {
55 $this->mid = $a_member_id;
56 }

◆ setObjId()

ilECSNodeMappingAssignment::setObjId (   $id)

Definition at line 98 of file class.ilECSNodeMappingAssignment.php.

99 {
100 $this->obj_id = $id;
101 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRefId()

ilECSNodeMappingAssignment::setRefId (   $a_id)

Definition at line 88 of file class.ilECSNodeMappingAssignment.php.

89 {
90 $this->ref_id = $a_id;
91 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setServerId()

ilECSNodeMappingAssignment::setServerId (   $a_id)

Definition at line 48 of file class.ilECSNodeMappingAssignment.php.

49 {
50 $this->server_id = $a_id;
51 }

◆ setTreeId()

ilECSNodeMappingAssignment::setTreeId (   $root)

Definition at line 68 of file class.ilECSNodeMappingAssignment.php.

69 {
70 $this->cs_root = $root;
71 }

◆ update()

ilECSNodeMappingAssignment::update ( )

Update node mapping.

Definition at line 136 of file class.ilECSNodeMappingAssignment.php.

137 {
138 global $ilDB;
139
140 $this->delete();
141 $this->create();
142
143 }

References $ilDB, and create().

+ Here is the call graph for this function:

Field Documentation

◆ $cs_id

ilECSNodeMappingAssignment::$cs_id
private

Definition at line 15 of file class.ilECSNodeMappingAssignment.php.

Referenced by __construct(), and getCSId().

◆ $cs_root

ilECSNodeMappingAssignment::$cs_root
private

Definition at line 14 of file class.ilECSNodeMappingAssignment.php.

Referenced by __construct(), and getTreeId().

◆ $mapped

ilECSNodeMappingAssignment::$mapped = false
private

Definition at line 23 of file class.ilECSNodeMappingAssignment.php.

Referenced by isMapped().

◆ $mid

ilECSNodeMappingAssignment::$mid
private

Definition at line 13 of file class.ilECSNodeMappingAssignment.php.

Referenced by __construct(), and getMemberId().

◆ $obj_id

ilECSNodeMappingAssignment::$obj_id
private

Definition at line 17 of file class.ilECSNodeMappingAssignment.php.

Referenced by getObjId().

◆ $position_update

ilECSNodeMappingAssignment::$position_update = false
private

Definition at line 20 of file class.ilECSNodeMappingAssignment.php.

Referenced by isPositionUpdateEnabled().

◆ $ref_id

ilECSNodeMappingAssignment::$ref_id
private

Definition at line 16 of file class.ilECSNodeMappingAssignment.php.

Referenced by getRefId().

◆ $server_id

ilECSNodeMappingAssignment::$server_id
private

Definition at line 12 of file class.ilECSNodeMappingAssignment.php.

Referenced by getServerId().

◆ $title_update

ilECSNodeMappingAssignment::$title_update = false
private

Definition at line 19 of file class.ilECSNodeMappingAssignment.php.

Referenced by isTitleUpdateEnabled().

◆ $tree_update

ilECSNodeMappingAssignment::$tree_update = false
private

Definition at line 21 of file class.ilECSNodeMappingAssignment.php.

Referenced by isTreeUpdateEnabled().


The documentation for this class was generated from the following file: