4 require_once
"Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php";
26 return self::TYPE_TEXT;
39 if (is_numeric($max)) {
40 $def->setMaxLength($max);
60 if ($a_value !== null) {
61 $a_value = (int) $a_value;
63 $this->max_length = $a_value;
83 $this->multi = (bool) $a_value;
127 $res[
$lng->txt(
"md_adv_text_multi")] =
$lng->txt(
"yes");
148 $max->setSuffix(
$lng->txt(
"characters"));
149 $max->setMinValue(1);
150 $max->setMaxValue(4000);
159 $max->setDisabled(
true);
160 $multi->setDisabled(
true);
189 if ($a_key ==
"max") {
192 if ($a_key ==
"multi") {
193 $this->
setMulti($a_value !=
"" ? $a_value : null);
199 return $element->getText();
204 $this->
getADT()->setText($a_cdata);
209 switch ($a_ecs_type) {
211 $value = implode(
',', (array) $a_value);
215 $value = (int) $a_value;
219 $value = (string) $a_value;
224 $value = $a_value->{
'get' . ucfirst($a_sub_id)}();
230 $this->
getADT()->setText($value);
245 $a_text->setMulti($this->
isMulti(), 80, 6);
255 return $a_adt_search->getADT()->getText();
262 $ilDB = $DIC[
'ilDB'];
267 foreach ($a_records as $record) {
268 if ($record[
"sub_type"] ==
"-") {
270 $obj_ids[$record[
"obj_id"]] = $record;
274 $sql =
"SELECT obj_id,type" .
275 " FROM object_data" .
276 " WHERE " .
$ilDB->in(
"obj_id", array_keys($obj_ids),
"",
"integer") .
277 " AND " .
$ilDB->in(
"type", $a_object_types,
"",
"text");
278 $set =
$ilDB->query($sql);
279 while ($row =
$ilDB->fetchAssoc($set)) {
280 $row[
"found"] = array();
281 foreach ($obj_ids[$row[
"obj_id"]] as $field => $value) {
282 if (substr($field, 0, 5) ==
"found") {
283 $row[
"found"][$field] = $value;
306 include_once(
'Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php');
314 if (
sizeof($objects)) {
getValueForXML(ilADT $element)
Representation of ECS EContent Time Place.
getQuotedWords($with_quotation=false)
setMulti($a_value)
Set multi-line.
AMD field abstract base class.
getADT()
Get ADT instance.
addPropertiesToXML(ilXmlWriter $a_writer)
importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form)
Import custom post values from definition form.
searchObjects(ilADTSearchBridge $a_adt_search, ilQueryParser $a_parser, array $a_object_types, $a_locate, $a_search_type)
Search.
static getInstance()
Get singleton.
getMaxLength()
Get max length.
static find($a_table, $a_type, $a_field_id, $a_condition, $a_additional_fields=null)
Find entries.
foreach($_POST as $key=> $value) $res
getSearchQueryParserValue(ilADTSearchBridge $a_adt_search)
importValueFromXML($a_cdata)
importXMLProperty($a_key, $a_value)
importFieldDefinition(array $a_def)
addCustomFieldToDefinitionForm(ilPropertyFormGUI $a_form, $a_disabled=false)
Add input elements to definition form.
ADT search bridge base class.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
importFromECS($a_ecs_type, $a_value, $a_sub_id)
parseSearchObjects(array $a_records, array $a_object_types)
getFieldDefinitionForTableGUI()
getSQLCondition($a_element_id)
Get SQL condition for current value(s)
getFieldId()
Get field_id.
setMaxLength($a_value)
Set max length.
prepareElementForEditor(ilADTFormBridge $a_text)