ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilECSNodeMappingAssignment Class Reference
+ Collaboration diagram for ilECSNodeMappingAssignment:

Public Member Functions

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

Static Public Member Functions

static deleteByServerId ($a_server_id)
 

Protected Member Functions

 read ()
 read settings More...
 

Private Attributes

int $server_id
 
int $mid
 
int $cs_root
 
int $cs_id
 
int $ref_id
 
int $obj_id
 
bool $title_update = false
 
bool $position_update = false
 
bool $tree_update = false
 
bool $mapped = false
 
ilDBInterface $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

42  {
43  global $DIC;
44 
45  $this->db = $DIC->database();
46 
47  $this->server_id = $a_server_id;
48  $this->mid = $mid;
49  $this->cs_root = $cs_root;
50  $this->cs_id = $cs_id;
51 
52  $this->read();
53  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilECSNodeMappingAssignment::create ( )

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

References getCSId(), getMembershipId(), getObjId(), getRefId(), getServerId(), getTreeId(), isPositionUpdateEnabled(), isTitleUpdateEnabled(), and isTreeUpdateEnabled().

Referenced by update().

159  : bool
160  {
161  $query = 'INSERT INTO ecs_node_mapping_a (server_id,mid,cs_root,cs_id,ref_id,obj_id,title_update,position_update,tree_update) ' .
162  'VALUES( ' .
163  $this->db->quote($this->getServerId(), 'integer') . ', ' .
164  $this->db->quote($this->getMembershipId(), 'integer') . ', ' .
165  $this->db->quote($this->getTreeId(), 'integer') . ', ' .
166  $this->db->quote($this->getCSId(), 'integer') . ', ' .
167  $this->db->quote($this->getRefId(), 'integer') . ', ' .
168  $this->db->quote($this->getObjId(), 'integer') . ', ' .
169  $this->db->quote($this->isTitleUpdateEnabled(), 'integer') . ', ' .
170  $this->db->quote($this->isPositionUpdateEnabled(), 'integer') . ', ' .
171  $this->db->quote($this->isTreeUpdateEnabled(), 'integer') . ' ' .
172  ')';
173  $this->db->manipulate($query);
174  return true;
175  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delete()

ilECSNodeMappingAssignment::delete ( )

Delete entry.

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

References getCSId(), getMembershipId(), getServerId(), and getTreeId().

181  : void
182  {
183  $query = 'DELETE FROM ecs_node_mapping_a ' .
184  'WHERE server_id = ' . $this->db->quote($this->getServerId(), 'integer') . ' ' .
185  'AND mid = ' . $this->db->quote($this->getMembershipId(), 'integer') . ' ' .
186  'AND cs_root = ' . $this->db->quote($this->getTreeId(), 'integer') . ' ' .
187  'AND cs_id = ' . $this->db->quote($this->getCSId(), 'integer');
188  $this->db->manipulate($query);
189  }
+ Here is the call graph for this function:

◆ deleteByServerId()

static ilECSNodeMappingAssignment::deleteByServerId (   $a_server_id)
static

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

References $DIC, and $ilDB.

Referenced by ilECSSetting\delete().

215  : bool
216  {
217  global $DIC;
218 
219  $ilDB = $DIC['ilDB'];
220 
221  $query = 'DELETE FROM ecs_node_mapping_a' .
222  ' WHERE server_id = ' . $ilDB->quote($a_server_id, 'integer');
223  $ilDB->manipulate($query);
224  return true;
225  }
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ enablePositionUpdate()

ilECSNodeMappingAssignment::enablePositionUpdate ( bool  $enabled)

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

Referenced by read().

135  : void
136  {
137  $this->position_update = $enabled;
138  }
+ Here is the caller graph for this function:

◆ enableTitleUpdate()

ilECSNodeMappingAssignment::enableTitleUpdate ( bool  $enabled)

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

Referenced by read().

125  : void
126  {
127  $this->title_update = $enabled;
128  }
+ Here is the caller graph for this function:

◆ enableTreeUpdate()

ilECSNodeMappingAssignment::enableTreeUpdate ( bool  $enabled)

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

Referenced by read().

145  : void
146  {
147  $this->tree_update = $enabled;
148  }
+ Here is the caller graph for this function:

◆ getCSId()

ilECSNodeMappingAssignment::getCSId ( )

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

References $cs_id.

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

90  : int
91  {
92  return $this->cs_id;
93  }
+ Here is the caller graph for this function:

◆ getMembershipId()

ilECSNodeMappingAssignment::getMembershipId ( )

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

References $mid.

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

75  : int
76  {
77  return $this->mid;
78  }
+ Here is the caller graph for this function:

◆ getObjId()

ilECSNodeMappingAssignment::getObjId ( )

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

References $obj_id.

Referenced by create().

110  : int
111  {
112  return $this->obj_id;
113  }
+ Here is the caller graph for this function:

◆ getRefId()

ilECSNodeMappingAssignment::getRefId ( )

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

References $ref_id.

Referenced by ilECSCmsTreeSynchronizer\checkTreeUpdates(), create(), and ilECSCmsTreeSynchronizer\syncNode().

100  : int
101  {
102  return $this->ref_id;
103  }
+ Here is the caller graph for this function:

◆ getServerId()

ilECSNodeMappingAssignment::getServerId ( )

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

References $server_id.

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

60  : int
61  {
62  return $this->server_id;
63  }
+ Here is the caller graph for this function:

◆ getTreeId()

ilECSNodeMappingAssignment::getTreeId ( )

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

References $cs_root.

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

80  : int
81  {
82  return $this->cs_root;
83  }
+ Here is the caller graph for this function:

◆ isMapped()

ilECSNodeMappingAssignment::isMapped ( )

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

References $mapped.

55  : bool
56  {
57  return $this->mapped;
58  }

◆ isPositionUpdateEnabled()

ilECSNodeMappingAssignment::isPositionUpdateEnabled ( )

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

References $position_update.

Referenced by create().

130  : bool
131  {
132  return $this->position_update;
133  }
+ Here is the caller graph for this function:

◆ isTitleUpdateEnabled()

ilECSNodeMappingAssignment::isTitleUpdateEnabled ( )

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

References $title_update.

Referenced by create().

120  : bool
121  {
122  return $this->title_update;
123  }
+ Here is the caller graph for this function:

◆ isTreeUpdateEnabled()

ilECSNodeMappingAssignment::isTreeUpdateEnabled ( )

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

References $tree_update.

Referenced by create().

140  : bool
141  {
142  return $this->tree_update;
143  }
+ Here is the caller graph for this function:

◆ read()

ilECSNodeMappingAssignment::read ( )
protected

read settings

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

References $res, enablePositionUpdate(), enableTitleUpdate(), enableTreeUpdate(), ilDBConstants\FETCHMODE_OBJECT, getCSId(), getMembershipId(), getServerId(), getTreeId(), setObjId(), and setRefId().

Referenced by __construct().

196  : void
197  {
198  $query = 'SELECT * FROM ecs_node_mapping_a ' .
199  'WHERE server_id = ' . $this->db->quote($this->getServerId(), 'integer') . ' ' .
200  'AND mid = ' . $this->db->quote($this->getMembershipId(), 'integer') . ' ' .
201  'AND cs_root = ' . $this->db->quote($this->getTreeId(), 'integer') . ' ' .
202  'AND cs_id = ' . $this->db->quote($this->getCSId(), 'integer') . ' ';
203  $res = $this->db->query($query);
204 
205  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
206  $this->setObjId($row->obj_id);
207  $this->setRefId($row->ref_id);
208  $this->enableTitleUpdate($row->title_update);
209  $this->enablePositionUpdate($row->position_update);
210  $this->enableTreeUpdate($row->tree_update);
211  $this->mapped = true;
212  }
213  }
$res
Definition: ltiservices.php:66
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCSId()

ilECSNodeMappingAssignment::setCSId ( int  $id)

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

References $id.

95  : void
96  {
97  $this->cs_id = $id;
98  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ setMembershipId()

ilECSNodeMappingAssignment::setMembershipId ( int  $a_member_id)

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

70  : void
71  {
72  $this->mid = $a_member_id;
73  }

◆ setObjId()

ilECSNodeMappingAssignment::setObjId ( int  $id)

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

References $id.

Referenced by read().

115  : void
116  {
117  $this->obj_id = $id;
118  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ setRefId()

ilECSNodeMappingAssignment::setRefId ( int  $a_id)

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

Referenced by read().

105  : void
106  {
107  $this->ref_id = $a_id;
108  }
+ Here is the caller graph for this function:

◆ setServerId()

ilECSNodeMappingAssignment::setServerId ( int  $a_id)

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

65  : void
66  {
67  $this->server_id = $a_id;
68  }

◆ setTreeId()

ilECSNodeMappingAssignment::setTreeId ( int  $root)

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

85  : void
86  {
87  $this->cs_root = $root;
88  }

◆ update()

ilECSNodeMappingAssignment::update ( )

Update node mapping.

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

References create().

153  : void
154  {
155  $this->delete();
156  $this->create();
157  }
+ Here is the call graph for this function:

Field Documentation

◆ $cs_id

int ilECSNodeMappingAssignment::$cs_id
private

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

Referenced by __construct(), and getCSId().

◆ $cs_root

int ilECSNodeMappingAssignment::$cs_root
private

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

Referenced by __construct(), and getTreeId().

◆ $db

ilDBInterface ilECSNodeMappingAssignment::$db
private

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

◆ $mapped

bool ilECSNodeMappingAssignment::$mapped = false
private

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

Referenced by isMapped().

◆ $mid

int ilECSNodeMappingAssignment::$mid
private

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

Referenced by __construct(), and getMembershipId().

◆ $obj_id

int ilECSNodeMappingAssignment::$obj_id
private

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

Referenced by getObjId().

◆ $position_update

bool ilECSNodeMappingAssignment::$position_update = false
private

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

Referenced by isPositionUpdateEnabled().

◆ $ref_id

int ilECSNodeMappingAssignment::$ref_id
private

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

Referenced by getRefId().

◆ $server_id

int ilECSNodeMappingAssignment::$server_id
private

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

Referenced by getServerId().

◆ $title_update

bool ilECSNodeMappingAssignment::$title_update = false
private

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

Referenced by isTitleUpdateEnabled().

◆ $tree_update

bool ilECSNodeMappingAssignment::$tree_update = false
private

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

Referenced by isTreeUpdateEnabled().


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