ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ilDB $ilDB. More...
 

Static Public Member Functions

static deleteByServerId ($a_server_id)
 

Protected Member Functions

 read ()
 read settings 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.

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

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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilECSNodeMappingAssignment::create ( )

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

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

Referenced by update().

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

◆ delete()

ilECSNodeMappingAssignment::delete ( )

Delete entry ilDB $ilDB.

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

References $ilDB, $query, getCSId(), getMemberId(), getServerId(), and getTreeId().

170  {
171  global $ilDB;
172 
173  $query = 'DELETE FROM ecs_node_mapping_a ' .
174  'WHERE server_id = ' . $ilDB->quote($this->getServerId(), 'integer') . ' ' .
175  'AND mid = ' . $ilDB->quote($this->getMemberId(), 'integer') . ' ' .
176  'AND cs_root = ' . $ilDB->quote($this->getTreeId(), 'integer') . ' ' .
177  'AND cs_id = ' . $ilDB->quote($this->getCSId(), 'integer');
178  $ilDB->manipulate($query);
179  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ deleteByServerId()

static ilECSNodeMappingAssignment::deleteByServerId (   $a_server_id)
static

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

References $ilDB, and $query.

Referenced by ilECSSetting\delete().

211  {
212  global $ilDB;
213 
214  $query = 'DELETE FROM ecs_node_mapping_a' .
215  ' WHERE server_id = ' . $ilDB->quote($a_server_id, 'integer');
216  $ilDB->manipulate($query);
217  return true;
218  }
$query
global $ilDB
+ Here is the caller graph for this function:

◆ enablePositionUpdate()

ilECSNodeMappingAssignment::enablePositionUpdate (   $enabled)

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

Referenced by read().

119  {
120  $this->position_update = $enabled;
121  }
+ Here is the caller graph for this function:

◆ enableTitleUpdate()

ilECSNodeMappingAssignment::enableTitleUpdate (   $enabled)

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

Referenced by read().

109  {
110  $this->title_update = $enabled;
111  }
+ Here is the caller graph for this function:

◆ enableTreeUpdate()

ilECSNodeMappingAssignment::enableTreeUpdate (   $enabled)

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

Referenced by read().

129  {
130  $this->tree_update = $enabled;
131  }
+ Here is the caller graph for this function:

◆ getCSId()

ilECSNodeMappingAssignment::getCSId ( )

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

References $cs_id.

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

+ Here is the caller graph for this function:

◆ getMemberId()

ilECSNodeMappingAssignment::getMemberId ( )

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

References $mid.

Referenced by create(), delete(), 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.

References $cs_root.

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

+ Here is the caller graph for this function:

◆ isMapped()

ilECSNodeMappingAssignment::isMapped ( )

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

References $mapped.

◆ 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 ilDB $ilDB

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

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

Referenced by __construct().

188  {
189  global $ilDB;
190 
191  $query = 'SELECT * FROM ecs_node_mapping_a ' .
192  'WHERE server_id = ' . $ilDB->quote($this->getServerId(), 'integer') . ' ' .
193  'AND mid = ' . $ilDB->quote($this->getMemberId(), 'integer') . ' ' .
194  'AND cs_root = ' . $ilDB->quote($this->getTreeId(), 'integer') . ' ' .
195  'AND cs_id = ' . $ilDB->quote($this->getCSId(), 'integer') . ' ';
196  $res = $ilDB->query($query);
197 
198  #$GLOBALS['ilLog']->write(__METHOD__.': '.$query);
199 
200  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
201  $this->setObjId($row->obj_id);
202  $this->setRefId($row->ref_id);
203  $this->enableTitleUpdate($row->title_update);
204  $this->enablePositionUpdate($row->position_update);
205  $this->enableTreeUpdate($row->tree_update);
206  $this->mapped = true;
207  }
208  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ 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.

References $id.

79  {
80  $this->cs_id = $id;
81  }
if(!array_key_exists('StateId', $_REQUEST)) $id

◆ 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.

References $id.

Referenced by read().

99  {
100  $this->obj_id = $id;
101  }
if(!array_key_exists('StateId', $_REQUEST)) $id
+ Here is the caller graph for this function:

◆ setRefId()

ilECSNodeMappingAssignment::setRefId (   $a_id)

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

Referenced by read().

89  {
90  $this->ref_id = $a_id;
91  }
+ 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.

References $ilDB, and create().

137  {
138  global $ilDB;
139 
140  $this->delete();
141  $this->create();
142  }
global $ilDB
+ 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: