19 declare(strict_types=1);
42 $this->db = $DIC->database();
44 $this->server_id = $a_server_id;
45 $this->obj_id = $a_obj_id;
52 $this->server_id = $a_server_id;
65 $this->imported = $a_status;
70 $this->sub_id = $a_id;
75 return (isset($this->sub_id) && $this->sub_id !==
'') ? $this->sub_id :
null;
83 $this->content_id = $a_content_id;
118 $this->econtent_id = $a_id;
134 $query =
"DELETE FROM ecs_import " .
135 "WHERE obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" " .
136 'AND server_id = ' . $this->db->quote($this->
getServerId(),
'integer');
137 $this->db->manipulate($query);
139 $query =
"INSERT INTO ecs_import (obj_id,mid,econtent_id,sub_id,server_id,content_id) " .
141 $this->db->quote($this->obj_id,
'integer') .
", " .
142 $this->db->quote($this->mid,
'integer') .
", " .
143 $this->db->quote($this->econtent_id,
'text') .
", " .
144 $this->db->quote($this->
getSubId(),
'text') .
', ' .
145 $this->db->quote($this->
getServerId(),
'integer') .
', ' .
149 $this->db->manipulate($query);
159 $query =
"SELECT * FROM ecs_import WHERE " .
160 "obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" " .
161 'AND server_id = ' . $this->db->quote($this->
getServerId(),
'integer');
162 $res = $this->db->query($query);
164 $this->econtent_id = $row->econtent_id;
165 $this->mid = (
int) $row->mid;
166 $this->sub_id = $row->sub_id;
167 $this->content_id = $row->content_id;
setServerId($a_server_id)
__construct(int $a_server_id, int $a_obj_id)
setImported(bool $a_status)
Set imported.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Storage of ECS imported objects.
getEContentId()
get econtent id
getContentId()
get content id
setContentId($a_content_id)
Set content id.
setEContentId($a_id)
set econtent id