ILIAS  release_8 Revision v8.24
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 40 of file class.ilECSNodeMappingAssignment.php.

41 {
42 global $DIC;
43
44 $this->db = $DIC->database();
45
46 $this->server_id = $a_server_id;
47 $this->mid = $mid;
48 $this->cs_root = $cs_root;
49 $this->cs_id = $cs_id;
50
51 $this->read();
52 }
global $DIC
Definition: feed.php:28

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

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilECSNodeMappingAssignment::create ( )

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

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

References $query, getCSId(), getMembershipId(), 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.

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

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

References $query, and getServerId().

+ Here is the call graph for this function:

◆ deleteByServerId()

static ilECSNodeMappingAssignment::deleteByServerId (   $a_server_id)
static

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

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

References $DIC, $ilDB, and $query.

Referenced by ilECSSetting\delete().

+ Here is the caller graph for this function:

◆ enablePositionUpdate()

ilECSNodeMappingAssignment::enablePositionUpdate ( bool  $enabled)

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

134 : void
135 {
136 $this->position_update = $enabled;
137 }
bool $enabled
Whether the system instance is enabled to accept connection requests.
Definition: System.php:123

References ILIAS\LTI\ToolProvider\$enabled.

Referenced by read().

+ Here is the caller graph for this function:

◆ enableTitleUpdate()

ilECSNodeMappingAssignment::enableTitleUpdate ( bool  $enabled)

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

124 : void
125 {
126 $this->title_update = $enabled;
127 }

References ILIAS\LTI\ToolProvider\$enabled.

Referenced by read().

+ Here is the caller graph for this function:

◆ enableTreeUpdate()

ilECSNodeMappingAssignment::enableTreeUpdate ( bool  $enabled)

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

144 : void
145 {
146 $this->tree_update = $enabled;
147 }

References ILIAS\LTI\ToolProvider\$enabled.

Referenced by read().

+ Here is the caller graph for this function:

◆ getCSId()

ilECSNodeMappingAssignment::getCSId ( )

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

89 : int
90 {
91 return $this->cs_id;
92 }

References $cs_id.

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

+ Here is the caller graph for this function:

◆ getMembershipId()

ilECSNodeMappingAssignment::getMembershipId ( )

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

74 : int
75 {
76 return $this->mid;
77 }

References $mid.

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ getObjId()

ilECSNodeMappingAssignment::getObjId ( )

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

109 : int
110 {
111 return $this->obj_id;
112 }

References $obj_id.

Referenced by create().

+ Here is the caller graph for this function:

◆ getRefId()

ilECSNodeMappingAssignment::getRefId ( )

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

99 : int
100 {
101 return $this->ref_id;
102 }

References $ref_id.

Referenced by create().

+ Here is the caller graph for this function:

◆ getServerId()

ilECSNodeMappingAssignment::getServerId ( )

Definition at line 59 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 79 of file class.ilECSNodeMappingAssignment.php.

79 : int
80 {
81 return $this->cs_root;
82 }

References $cs_root.

Referenced by create(), and read().

+ Here is the caller graph for this function:

◆ isMapped()

ilECSNodeMappingAssignment::isMapped ( )

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

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

References $mapped.

◆ isPositionUpdateEnabled()

ilECSNodeMappingAssignment::isPositionUpdateEnabled ( )

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

129 : bool
130 {
132 }

References $position_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ isTitleUpdateEnabled()

ilECSNodeMappingAssignment::isTitleUpdateEnabled ( )

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

119 : bool
120 {
121 return $this->title_update;
122 }

References $title_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ isTreeUpdateEnabled()

ilECSNodeMappingAssignment::isTreeUpdateEnabled ( )

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

139 : bool
140 {
141 return $this->tree_update;
142 }

References $tree_update.

Referenced by create().

+ Here is the caller graph for this function:

◆ read()

ilECSNodeMappingAssignment::read ( )
protected

read settings

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

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

References $query, $res, enablePositionUpdate(), enableTitleUpdate(), enableTreeUpdate(), ilDBConstants\FETCHMODE_OBJECT, getCSId(), getMembershipId(), 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 ( int  $id)

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

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

References $id.

◆ setMembershipId()

ilECSNodeMappingAssignment::setMembershipId ( int  $a_member_id)

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

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

◆ setObjId()

ilECSNodeMappingAssignment::setObjId ( int  $id)

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

114 : void
115 {
116 $this->obj_id = $id;
117 }

References $id.

Referenced by read().

+ Here is the caller graph for this function:

◆ setRefId()

ilECSNodeMappingAssignment::setRefId ( int  $a_id)

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

104 : void
105 {
106 $this->ref_id = $a_id;
107 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setServerId()

ilECSNodeMappingAssignment::setServerId ( int  $a_id)

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

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

◆ setTreeId()

ilECSNodeMappingAssignment::setTreeId ( int  $root)

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

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

◆ update()

ilECSNodeMappingAssignment::update ( )

Update node mapping.

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

152 : void
153 {
154 $this->delete();
155 $this->create();
156 }

References create().

+ Here is the call graph for this function:

Field Documentation

◆ $cs_id

int ilECSNodeMappingAssignment::$cs_id
private

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

Referenced by __construct(), and getCSId().

◆ $cs_root

int ilECSNodeMappingAssignment::$cs_root
private

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

Referenced by __construct(), and getTreeId().

◆ $db

ilDBInterface ilECSNodeMappingAssignment::$db
private

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

◆ $mapped

bool ilECSNodeMappingAssignment::$mapped = false
private

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

Referenced by isMapped().

◆ $mid

int ilECSNodeMappingAssignment::$mid
private

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

Referenced by __construct(), and getMembershipId().

◆ $obj_id

int ilECSNodeMappingAssignment::$obj_id
private

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

Referenced by getObjId().

◆ $position_update

bool ilECSNodeMappingAssignment::$position_update = false
private

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

Referenced by isPositionUpdateEnabled().

◆ $ref_id

int ilECSNodeMappingAssignment::$ref_id
private

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

Referenced by getRefId().

◆ $server_id

int ilECSNodeMappingAssignment::$server_id
private

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

Referenced by getServerId().

◆ $title_update

bool ilECSNodeMappingAssignment::$title_update = false
private

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

Referenced by isTitleUpdateEnabled().

◆ $tree_update

bool ilECSNodeMappingAssignment::$tree_update = false
private

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

Referenced by isTreeUpdateEnabled().


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