4 require_once
"Services/AdvancedMetaData/classes/Types/class.ilAdvancedMDFieldDefinitionSelect.php";
35 $def->setNumeric(
false);
56 $missing = array_diff($old, $new);
60 if(!is_array($this->confirmed_objects))
65 foreach($missing as $missing_value)
70 foreach($in_use as $item)
72 $this->confirm_objects[$missing_value][] = $item;
79 $this->old_options = $old;
87 $a_search->
getADT()->setSelections(array($a_value));
98 foreach($in_use as $item)
100 $res[] = array($item[
"obj_id"], $item[
"sub_type"], $item[
"sub_id"], $item[
"value"]);
114 if(
sizeof($this->confirmed_objects))
119 $def->setOptions(array_combine($this->old_options, $this->old_options));
123 foreach($this->confirmed_objects as $old_option => $item_ids)
126 $old_values = array();
129 $old_values[$item[0].
"_".$item[1].
"_".$item[2]] = $item[3];
132 foreach($item_ids as $item => $new_option)
134 $parts = explode(
"_", $item);
136 $sub_type = $parts[1];
143 "obj_id" => array(
"integer", $obj_id),
144 "sub_type" => array(
"text", $sub_type),
145 "sub_id" => array(
"integer", $sub_id),
146 "field_id" => array(
"integer", $this->
getFieldId())
153 if(isset($old_values[$item]))
158 array_shift($old_value);
159 array_pop($old_value);
160 $old_idx = array_keys($old_value, $old_option);
164 $old_idx = array_pop($old_idx);
165 $old_value[$old_idx] = $new_option;
166 $new_value = array_unique($old_value);
173 "obj_id" => array(
"integer", $obj_id),
174 "sub_type" => array(
"text", $sub_type),
175 "sub_id" => array(
"integer", $sub_id),
176 "field_id" => array(
"integer", $this->
getFieldId())
183 if($sub_type ==
"wpg")
186 include_once
"Modules/Wiki/classes/class.ilPCAMDPageList.php";
192 $this->confirmed_objects = array();
205 return self::XML_SEPARATOR.
206 implode(self::XML_SEPARATOR, $element->getSelections()).
212 $this->
getADT()->setSelections(explode(self::XML_SEPARATOR, $a_cdata));