36        $this->export_id = $a_export_id;
 
   46        if (self::$instance) {
 
   72        $query = 
'SELECT MAX(export_id) exp FROM export_options ' .
 
   73            '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) {
 
  102            if ($mode == self::EXPORT_BUILD) {
 
  116        foreach ((array) $this->ref_options[self::KEY_ITEM_MODE] as $ref_id => $mode) {
 
  117            if ($mode != self::EXPORT_OMIT) {
 
  133    public function addOption($a_keyword, $a_ref_id, $a_obj_id, $a_value)
 
  139        $query = 
"SELECT MAX(pos) position FROM export_options";
 
  144            $pos = $row->position;
 
  148        $query = 
'INSERT INTO export_options (export_id,keyword,ref_id,obj_id,value,pos) ' .
 
  151            $ilDB->quote($a_keyword, 
'integer') . 
', ' .
 
  152            $ilDB->quote($a_ref_id, 
'integer') . 
', ' .
 
  153            $ilDB->quote($a_obj_id, 
'integer') . 
', ' .
 
  154            $ilDB->quote($a_value, 
'integer') . 
', ' .
 
  155            $ilDB->quote($pos, 
'integer') . 
' ' .
 
  167        return isset($this->options[$a_keyword]) ? $this->options[$a_keyword] : 
null;
 
  178        return isset($this->obj_options[$a_keyword][$a_obj_id]) ? $this->obj_options[$a_keyword][$a_obj_id] : 
null;
 
  189        return isset($this->ref_options[$a_keyword][$a_ref_id]) ? $this->ref_options[$a_keyword][$a_ref_id] : 
null;
 
  196    public function delete()
 
  202        $query = 
"DELETE FROM export_options " .
 
  218        $this->options = array();
 
  219        $this->obj_options = array();
 
  220        $this->ref_options = array();
 
  222        $query = 
"SELECT * FROM export_options " .
 
  223            "WHERE export_id = " . 
$ilDB->quote($this->
getExportId(), 
'integer') . 
' ' .
 
  228                $this->ref_options[$row->keyword][$row->ref_id] = $row->value;
 
  231                $this->obj_options[$row->keyword][$row->obj_id] = $row->value;
 
  233            if (!$row->ref_id and !$row->obj_id) {
 
  234                $this->options[$row->keyword] = $row->value;
 
An exception for terminatinating execution or to throw for unit testing.
__construct($a_export_id)
Singleton constructor.
getSubitemsForCreation($a_source_id)
Get all subitems with mode ilExportOptions::EXPORT_BUILD
static getInstance()
Get singelton instance.
getOption($a_keyword)
Get option.
getSubitemsForExport()
Get all subitems with mode != self::EXPORT_OMIT.
getOptionByObjId($a_obj_id, $a_keyword)
Get option by.
addOption($a_keyword, $a_ref_id, $a_obj_id, $a_value)
static newInstance($a_export_id)
Create new instance.
getOptionByRefId($a_ref_id, $a_keyword)
Get option by.
static allocateExportId()
Allocate a new export id.
getExportId()
Get export id.
foreach($_POST as $key=> $value) $res