36 $this->export_id = $a_export_id;
71 $query =
'SELECT MAX(export_id) exp FROM export_options '.
72 'GROUP BY export_id ';
77 $exp_id =
$row->exp + 1;
79 $query =
'INSERT INTO export_options (export_id,keyword,ref_id,obj_id,value) '.
81 $ilDB->quote($exp_id,
'integer').
', '.
82 $ilDB->quote(self::KEY_INIT,
'integer').
', '.
83 $ilDB->quote(0,
'integer').
', '.
84 $ilDB->quote(0,
'integer').
', '.
85 $ilDB->quote(0,
'integer').
' '.
101 foreach((array) $this->ref_options[self::KEY_ITEM_MODE] as
$ref_id => $mode)
103 if($mode == self::EXPORT_BUILD)
118 foreach((array) $this->ref_options[self::KEY_ITEM_MODE] as
$ref_id => $mode)
120 if($mode != self::EXPORT_OMIT)
137 public function addOption($a_keyword, $a_ref_id, $a_obj_id, $a_value)
141 $query =
"SELECT MAX(pos) position FROM export_options";
151 $query =
'INSERT INTO export_options (export_id,keyword,ref_id,obj_id,value,pos) '.
154 $ilDB->quote($a_keyword,
'integer').
', '.
155 $ilDB->quote($a_ref_id,
'integer').
', '.
156 $ilDB->quote($a_obj_id,
'integer').
', '.
157 $ilDB->quote($a_value,
'integer').
', '.
158 $ilDB->quote(
$pos,
'integer').
' '.
160 $ilDB->manipulate(
$query);
170 return isset($this->options[$a_keyword]) ? $this->options[$a_keyword] : null;
181 return isset($this->obj_options[$a_keyword][$a_obj_id]) ? $this->obj_options[$a_keyword][$a_obj_id] : null;
192 return isset($this->ref_options[$a_keyword][$a_ref_id]) ? $this->ref_options[$a_keyword][$a_ref_id] : null;
199 public function delete()
203 $query =
"DELETE FROM export_options ".
204 "WHERE export_id = ".$ilDB->quote($this->
getExportId(),
'integer');
205 $ilDB->manipulate(
$query);
217 $this->options = array();
218 $this->obj_options = array();
219 $this->ref_options = array();
221 $query =
"SELECT * FROM export_options ".
222 "WHERE export_id = ".$ilDB->quote($this->
getExportId(),
'integer').
' '.
229 $this->ref_options[
$row->keyword][
$row->ref_id] =
$row->value;
233 $this->obj_options[
$row->keyword][
$row->obj_id] =
$row->value;
237 $this->options[
$row->keyword] =
$row->value;