4 require_once
"Services/AdvancedMetaData/classes/Types/class.ilAdvancedMDFieldDefinitionSelect.php";
24 return self::TYPE_SELECT_MULTI;
35 $def->setNumeric(
false);
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];
140 if(isset($old_values[$item]))
145 array_shift($old_value);
146 array_pop($old_value);
148 $old_idx = array_keys($old_value, $old_option);
151 $old_idx = array_pop($old_idx);
156 $old_value[$old_idx] = $new_option;
161 unset($old_value[$old_idx]);
163 $new_value = array_unique($old_value);
166 "obj_id" =>
array(
"integer", $obj_id),
167 "sub_type" =>
array(
"text", $sub_type),
168 "sub_id" =>
array(
"integer", $sub_id),
173 if(
sizeof($new_value))
190 if($sub_type ==
"wpg")
193 include_once
"Modules/Wiki/classes/class.ilPCAMDPageList.php";
199 $this->confirmed_objects =
array();
212 return self::XML_SEPARATOR.
213 implode(self::XML_SEPARATOR, $element->getSelections()).
219 $this->
getADT()->setSelections(explode(self::XML_SEPARATOR, $a_cdata));
231 $a_enum->setAutoSort(
false);
findBySingleValue(ilADTEnumSearchBridgeMulti $a_search, $a_value)
getADTDefinition()
Get ADT definition instance.
static initActiveRecordByType()
Init active record by type.
getADT()
Get ADT instance.
static writeByPrimary($a_table, array $a_primary, $a_type, $a_value)
Write directly.
importValueFromXML($a_cdata)
static getInstance()
Get singleton.
importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form)
static find($a_table, $a_type, $a_field_id, $a_condition, $a_additional_fields=null)
Find entries.
static deleteByPrimary($a_table, array $a_primary, $a_type=null)
Delete values by (partial) primary key.
getSQLCondition($a_element_id)
setOptions(array $a_values=null)
Set options.
static migrateField($a_obj_id, $a_field_id, $old_option, $new_option, $a_is_multi=false)
Migrate search/filter values on advmd change.
Create styles array
The data for the language used.
getValueForXML(ilADT $element)
prepareElementForEditor(ilADTFormBridge $a_enum)
getFieldId()
Get field_id.
buildConfirmedObjects(ilPropertyFormGUI $a_form)
Process custom post values from definition form.