32 include_once
'class.ilMDBase.php';
45 $subs[
'Contribute'] =
'meta_contribute';
53 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
59 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
66 $con->setMetaId($a_contribute_id);
72 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
76 $con->setParentType(
'meta_lifecycle');
91 $this->status = $a_status;
103 $this->version = $a_version;
107 return $this->version;
111 if(is_object($lng_obj))
113 $this->version_language =& $lng_obj;
118 return $this->version_language;
122 if(is_object($this->version_language))
124 return $this->version_language->getLanguageCode();
134 $fields[
'meta_lifecycle_id'] = array(
'integer',$next_id = $ilDB->nextId(
'il_meta_lifecycle'));
136 if($this->db->insert(
'il_meta_lifecycle',$fields))
150 if($this->db->update(
'il_meta_lifecycle',
151 $this->__getFields(),
152 array(
"meta_lifecycle_id" => array(
'integer',$this->
getMetaId()))))
174 $query =
"DELETE FROM il_meta_lifecycle ".
175 "WHERE meta_lifecycle_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
185 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
186 'obj_id' => array(
'integer',$this->
getObjId()),
187 'obj_type' => array(
'text',$this->
getObjType()),
188 'lifecycle_status' => array(
'text',$this->
getStatus()),
189 'meta_version' => array(
'text',$this->
getVersion()),
197 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
201 $query =
"SELECT * FROM il_meta_lifecycle ".
202 "WHERE meta_lifecycle_id = ".$ilDB->quote($this->
getMetaId() ,
'integer');
225 $writer->xmlStartTag(
'Lifecycle',array(
'Status' => $this->
getStatus()
235 foreach($contributes as $id)
238 $con->toXML($writer);
240 if(!count($contributes))
242 include_once
'Services/MetaData/classes/class.ilMDContribute.php';
244 $con->toXML($writer);
246 $writer->xmlEndTag(
'Lifecycle');
256 $query =
"SELECT meta_lifecycle_id FROM il_meta_lifecycle ".
257 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
258 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
264 return $row->meta_lifecycle_id;