4 require_once
"Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php";
41 $def->setMaxLength($max);
63 $a_value = (int)$a_value;
65 $this->max_length = $a_value;
85 $this->multi = (bool)$a_value;
129 $res[$lng->txt(
"md_adv_text_multi")] = $lng->txt(
"yes");
148 $max->setMinValue(1);
149 $max->setMaxValue(4000);
159 $max->setDisabled(
true);
160 $multi->setDisabled(
true);
193 if($a_key ==
"multi")
195 $this->
setMulti($a_value !=
"" ? $a_value : null);
201 return $element->getText();
206 $this->
getADT()->setText($a_cdata);
214 $value = implode(
',', (array)$a_value);
218 $value = (int)$a_value;
222 $value = (string)$a_value;
228 $value = $a_value->{
'get'.ucfirst($a_sub_id)}();
235 $this->
getADT()->setText($value);
248 $a_text->
setMulti($this->isMulti(), 80, 6);
258 return $a_adt_search->getADT()->getText();
261 protected function parseSearchObjects(array $a_records, array $a_object_types)
268 foreach($a_records as $record)
270 if($record[
"sub_type"] ==
"-")
273 $obj_ids[$record[
"obj_id"]] = $record;
277 $sql =
"SELECT obj_id,type".
279 " WHERE ".$ilDB->in(
"obj_id", array_keys($obj_ids),
"",
"integer").
280 " AND ".$ilDB->in(
"type", $a_object_types,
"",
"text");
281 $set = $ilDB->query($sql);
282 while(
$row = $ilDB->fetchAssoc($set))
284 $row[
"found"] = array();
285 foreach($obj_ids[
$row[
"obj_id"]] as $field => $value)
287 if(substr($field, 0, 5) ==
"found")
289 $row[
"found"][$field] = $value;
312 include_once(
'Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php');
322 return $this->parseSearchObjects($objects, $a_object_types);