ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAdvancedMDFieldDefinitionText Class Reference

AMD field type text. More...

+ Inheritance diagram for ilAdvancedMDFieldDefinitionText:
+ Collaboration diagram for ilAdvancedMDFieldDefinitionText:

Public Member Functions

 getType ()
 
 getADTGroup ()
 
 getTitles ()
 
 hasComplexOptions ()
 
 setMaxLength ($a_value)
 Set max length. More...
 
 getMaxLength ()
 Get max length. More...
 
 setMulti ($a_value)
 Set multi-line. More...
 
 isMulti ()
 Is multi-line? More...
 
 getFieldDefinitionForTableGUI (string $content_language)
 
 addCustomFieldToDefinitionForm (ilPropertyFormGUI $a_form, $a_disabled=false, string $language='')
 Add input elements to definition form. More...
 
 importCustomDefinitionFormPostValues (ilPropertyFormGUI $a_form, string $language='')
 Import custom post values from definition form. More...
 
 importXMLProperty ($a_key, $a_value)
 
 importValueFromXML ($a_cdata)
 
 importFromECS ($a_ecs_type, $a_value, $a_sub_id)
 
 prepareElementForEditor (ilADTFormBridge $form)
 
 getSearchQueryParserValue (ilADTSearchBridge $a_adt_search)
 
 searchObjects (ilADTSearchBridge $a_adt_search, ilQueryParser $a_parser, array $a_object_types, $a_locate, $a_search_type)
 Search. More...
 
- Public Member Functions inherited from ilAdvancedMDFieldDefinitionGroupBased
 setOptions (array $a_values=null)
 Set options. More...
 
 getOptions ()
 Get options. More...
 
 getFieldDefinitionForTableGUI (string $content_language)
 
 importCustomDefinitionFormPostValues (ilPropertyFormGUI $a_form, string $language='')
 Import custom post values from definition form. More...
 
 importXMLProperty ($a_key, $a_value)
 
 getValueForXML (ilADT $element)
 
 importValueFromXML ($a_cdata)
 
 getADTGroup ()
 
 getTitles ()
 
 hasComplexOptions ()
 
 getComplexOptionsOverview ($a_parent_gui, string $a_parent_cmd)
 
 exportOptionToTableGUI ($a_option, array &$a_item)
 
 initOptionForm (ilPropertyFormGUI $a_form, $a_option_id)
 
 updateComplexOption (ilPropertyFormGUI $a_form, $a_option_id)
 
- Public Member Functions inherited from ilAdvancedMDFieldDefinition
 __construct ($a_field_id=null, string $language='')
 Constructor. More...
 
 getType ()
 Get type. More...
 
 useDefaultLanguageMode (string $language)
 Check if default language mode has to be used: no language given or language equals default language. More...
 
 getTypeTitle ()
 Get type title (lang id) More...
 
 getADTDefinition ()
 Get ADT definition instance. More...
 
 getADT ()
 Get ADT instance. More...
 
 getFieldId ()
 Get field_id. More...
 
 setRecordId ($a_id)
 Set record id. More...
 
 getRecordId ()
 Get record id. More...
 
 setImportId ($a_id_string)
 Set import id. More...
 
 getImportId ()
 Get import id. More...
 
 setPosition ($a_pos)
 Set position. More...
 
 getPosition ()
 Get position. More...
 
 setTitle ($a_title)
 Get title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription ($a_desc)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 isSearchSupported ()
 Is search supported at all. More...
 
 isFilterSupported ()
 Is search by filter supported. More...
 
 setSearchable ($a_status)
 Toggle searchable. More...
 
 isSearchable ()
 Is searchable. More...
 
 setRequired ($a_status)
 Toggle required. More...
 
 isRequired ()
 Is required field. More...
 
 getFieldDefinitionForTableGUI (string $content_language)
 Parse properties for table gui. More...
 
 addToFieldDefinitionForm (ilPropertyFormGUI $a_form, ilAdvancedMDPermissionHelper $a_permissions, string $language='')
 Add input elements to definition form. More...
 
 importCustomDefinitionFormPostValues (ilPropertyFormGUI $a_form, string $language='')
 Import custom post values from definition form. More...
 
 importDefinitionFormPostValues (ilPropertyFormGUI $a_form, ilAdvancedMDPermissionHelper $a_permissions, string $active_language)
 Import post values from definition form. More...
 
 importDefinitionFormPostValuesNeedsConfirmation ()
 
 prepareCustomDefinitionFormConfirmation (ilPropertyFormGUI $a_form)
 
 prepareDefinitionFormConfirmation (ilPropertyFormGUI $a_form)
 
 generateImportId ($a_field_id)
 Generate unique record id. More...
 
 save ($a_keep_pos=false)
 Create new field entry. More...
 
 update ()
 Update field entry. More...
 
 delete ()
 Delete field entry. More...
 
 toXML (ilXmlWriter $a_writer)
 To Xml. More...
 
 importXMLProperty ($a_key, $a_value)
 Import property from XML. More...
 
 getValueForXML (ilADT $element)
 Parse ADT value for xml (export) More...
 
 importValueFromXML ($a_cdata)
 Import value from xml. More...
 
 importFromECS ($a_ecs_type, $a_value, $a_sub_id)
 Import meta data from ECS. More...
 
 prepareElementForEditor (ilADTFormBridge $a_bridge)
 Prepare editor form elements. More...
 
 getSearchQueryParserValue (ilADTSearchBridge $a_adt_search)
 Get value for search query parser. More...
 
 getSearchValueSerialized (ilADTSearchBridge $a_adt_search)
 Get value for search persistence. More...
 
 setSearchValueSerialized (ilADTSearchBridge $a_adt_search, $a_value)
 Set value from search persistence. More...
 
 searchSubObjects (ilADTSearchBridge $a_adt_search, $a_obj_id, $sub_obj_type)
 
 searchObjects (ilADTSearchBridge $a_adt_search, ilQueryParser $a_parser, array $a_object_types, $a_locate, $a_search_type)
 Search objects. More...
 
 getLuceneSearchString ($a_value)
 Get search string in lucene syntax. More...
 
 prepareElementForSearch (ilADTSearchBridge $a_bridge)
 Prepare search form elements. More...
 
 _clone ($a_new_record_id)
 Clone field definition. More...
 
 hasComplexOptions ()
 
 getComplexOptionsOverview ($a_parent_gui, string $parent_cmd)
 

Data Fields

const XML_SEPARATOR_TRANSLATIONS = "~|~"
 
const XML_SEPARATOR_TRANSLATION = '~+~'
 
- Data Fields inherited from ilAdvancedMDFieldDefinition
const TYPE_SELECT = 1
 
const TYPE_TEXT = 2
 
const TYPE_DATE = 3
 
const TYPE_DATETIME = 4
 
const TYPE_INTEGER = 5
 
const TYPE_FLOAT = 6
 
const TYPE_LOCATION = 7
 
const TYPE_SELECT_MULTI = 8
 
const TYPE_ADDRESS = 99
 
const TYPE_EXTERNAL_LINK = 9
 
const TYPE_INTERNAL_LINK = 10
 

Protected Member Functions

 initADTDefinition ()
 
 importFieldDefinition (array $a_def)
 
 getFieldDefinition ()
 
 addPropertiesToXML (ilXmlWriter $a_writer)
 
 parseSearchObjects (array $a_records, array $a_object_types)
 
- Protected Member Functions inherited from ilAdvancedMDFieldDefinitionGroupBased
 initADTDefinition ()
 
 importFieldDefinition (array $a_def)
 
 getFieldDefinition ()
 
 addCustomFieldToDefinitionForm (ilPropertyFormGUI $a_form, $a_disabled=false, string $language='')
 Add input elements to definition form. More...
 
 addPropertiesToXML (ilXmlWriter $a_writer)
 
 getADTForOption ($a_option)
 
 importComplexOptionFromForm ($a_option, ilADT $a_adt)
 
 findOptionById ($a_id)
 
- Protected Member Functions inherited from ilAdvancedMDFieldDefinition
 init ()
 Init properties. More...
 
 initADTDefinition ()
 Init adt instance. More...
 
 setADT (ilADT $a_adt)
 Set ADT instance. More...
 
 setFieldId ($a_id)
 Set field_id. More...
 
 importFieldDefinition (array $a_def)
 Import (type-specific) field definition from DB. More...
 
 getFieldDefinition ()
 Get (type-specific) field definition. More...
 
 addCustomFieldToDefinitionForm (ilPropertyFormGUI $a_form, $a_disabled=false, string $language='')
 Add custom input elements to definition form. More...
 
 getLastPosition ()
 Get last position of record. More...
 
 getDBProperties ()
 Get all definition properties for DB. More...
 
 import (array $a_data)
 Import from DB. More...
 
 read ($a_field_id)
 Read field definition. More...
 
 addPropertiesToXML (ilXmlWriter $a_writer)
 Add (type-specific) properties to xml export. More...
 
 parseSearchObjects (array $a_records, array $a_object_types)
 Add object-data needed for global search to AMD search results. More...
 

Protected Attributes

 $max_length
 
 $multi
 
- Protected Attributes inherited from ilAdvancedMDFieldDefinitionGroupBased
 $options = array()
 
 $complex = array()
 
- Protected Attributes inherited from ilAdvancedMDFieldDefinition
 $field_id
 
 $record_id
 
 $import_id
 
 $position
 
 $title
 
 $description
 
 $searchable
 
 $required
 
 $adt_def
 
 $adt
 
 $language = ''
 
 $logger
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAdvancedMDFieldDefinition
static getInstance ($a_field_id, $a_type=null, string $language='')
 Get definition instance by type. More...
 
static exists ($a_field_id)
 Check if field exists. More...
 
static getInstanceByTypeString ($a_type)
 Get instance by type string (used by import) More...
 
static getInstancesByRecordId ($a_record_id, $a_only_searchable=false, string $language='')
 Get definitions by record id. More...
 
static getInstancesByObjType ($a_obj_type, $a_active_only=true)
 
static getInstanceByImportId ($a_import_id)
 Get definition instance by import id. More...
 
static getSearchableDefinitionIds ()
 Get searchable definition ids (performance is key) More...
 
static getADTGroupForDefinitions (array $a_defs)
 Init ADTGroup for definitions. More...
 
static getValidTypes ()
 Get all valid types. More...
 
static isValidType ($a_type)
 Is given type valid. More...
 
- Static Protected Member Functions inherited from ilAdvancedMDFieldDefinition
static getTypeString ($a_type)
 Get type string. More...
 

Detailed Description

AMD field type text.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilAdvancedMDFieldDefinitionText.php.

Member Function Documentation

◆ addCustomFieldToDefinitionForm()

ilAdvancedMDFieldDefinitionText::addCustomFieldToDefinitionForm ( ilPropertyFormGUI  $a_form,
  $a_disabled = false,
string  $language = '' 
)

Add input elements to definition form.

Parameters
ilPropertyFormGUI$a_form
bool$a_disabled
string$language

Definition at line 160 of file class.ilAdvancedMDFieldDefinitionText.php.

References $DIC, $lng, $multi, ilPropertyFormGUI\addItem(), getMaxLength(), isMulti(), and ilNumberInputGUI\setValue().

161  {
162  global $DIC;
163 
164  $lng = $DIC['lng'];
165 
166  $max = new ilNumberInputGUI($lng->txt("md_adv_text_max_length"), "max");
167  $max->setValue($this->getMaxLength());
168  $max->setSize(10);
169  $max->setSuffix($lng->txt("characters"));
170  $max->setMinValue(1);
171  $max->setMaxValue(4000); // DB limit
172  $a_form->addItem($max);
173 
174  $multi = new ilCheckboxInputGUI($lng->txt("md_adv_text_multi"), "multi");
175  $multi->setValue(1);
176  $multi->setChecked($this->isMulti());
177  $a_form->addItem($multi);
178 
179  if ($a_disabled) {
180  $max->setDisabled(true);
181  $multi->setDisabled(true);
182  }
183  }
setValue($a_value)
Set Value.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
$lng
This class represents a number property in a property form.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ addPropertiesToXML()

ilAdvancedMDFieldDefinitionText::addPropertiesToXML ( ilXmlWriter  $a_writer)
protected

Definition at line 202 of file class.ilAdvancedMDFieldDefinitionText.php.

References getMaxLength(), isMulti(), and ilXmlWriter\xmlElement().

203  {
204  $a_writer->xmlElement('FieldValue', array("id" => "max"), $this->getMaxLength());
205  $a_writer->xmlElement('FieldValue', array("id" => "multi"), $this->isMulti());
206  }
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:

◆ getADTGroup()

ilAdvancedMDFieldDefinitionText::getADTGroup ( )

Definition at line 39 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilAdvancedMDFieldDefinition\getADTDefinition().

40  {
41  return $this->getADTDefinition();
42  }
getADTDefinition()
Get ADT definition instance.
+ Here is the call graph for this function:

◆ getFieldDefinition()

ilAdvancedMDFieldDefinitionText::getFieldDefinition ( )
protected

Definition at line 128 of file class.ilAdvancedMDFieldDefinitionText.php.

References getMaxLength(), and isMulti().

129  {
130  return array(
131  "max" => $this->getMaxLength(),
132  "multi" => $this->isMulti()
133  );
134  }
+ Here is the call graph for this function:

◆ getFieldDefinitionForTableGUI()

ilAdvancedMDFieldDefinitionText::getFieldDefinitionForTableGUI ( string  $content_language)

Definition at line 136 of file class.ilAdvancedMDFieldDefinitionText.php.

References $DIC, $lng, $res, getMaxLength(), and isMulti().

137  {
138  global $DIC;
139 
140  $lng = $DIC['lng'];
141 
142  $res = array();
143 
144  if ($this->getMaxLength() !== null) {
145  $res[$lng->txt("md_adv_text_max_length")] = $this->getMaxLength();
146  }
147  if ($this->isMulti()) {
148  $res[$lng->txt("md_adv_text_multi")] = $lng->txt("yes");
149  }
150 
151  return $res;
152  }
foreach($_POST as $key=> $value) $res
$lng
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ getMaxLength()

ilAdvancedMDFieldDefinitionText::getMaxLength ( )

Get max length.

Returns
int

Definition at line 92 of file class.ilAdvancedMDFieldDefinitionText.php.

References $max_length.

Referenced by addCustomFieldToDefinitionForm(), addPropertiesToXML(), getFieldDefinition(), getFieldDefinitionForTableGUI(), and initADTDefinition().

+ Here is the caller graph for this function:

◆ getSearchQueryParserValue()

ilAdvancedMDFieldDefinitionText::getSearchQueryParserValue ( ilADTSearchBridge  $a_adt_search)

Definition at line 291 of file class.ilAdvancedMDFieldDefinitionText.php.

292  {
293  return $a_adt_search->getADT()->getText();
294  }

◆ getTitles()

ilAdvancedMDFieldDefinitionText::getTitles ( )

Definition at line 44 of file class.ilAdvancedMDFieldDefinitionText.php.

45  {
46  return [];
47  }

◆ getType()

ilAdvancedMDFieldDefinitionText::getType ( )

Definition at line 33 of file class.ilAdvancedMDFieldDefinitionText.php.

Referenced by searchObjects().

34  {
35  return self::TYPE_TEXT;
36  }
+ Here is the caller graph for this function:

◆ hasComplexOptions()

ilAdvancedMDFieldDefinitionText::hasComplexOptions ( )

Definition at line 49 of file class.ilAdvancedMDFieldDefinitionText.php.

50  {
51  return false;
52  }

◆ importCustomDefinitionFormPostValues()

ilAdvancedMDFieldDefinitionText::importCustomDefinitionFormPostValues ( ilPropertyFormGUI  $a_form,
string  $language = '' 
)

Import custom post values from definition form.

Parameters
ilPropertyFormGUI$a_form
string$language

Definition at line 190 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilPropertyFormGUI\getInput(), setMaxLength(), and setMulti().

191  {
192  $max = $a_form->getInput("max");
193  $this->setMaxLength(($max !== "") ? $max : null);
194 
195  $this->setMulti($a_form->getInput("multi"));
196  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

◆ importFieldDefinition()

ilAdvancedMDFieldDefinitionText::importFieldDefinition ( array  $a_def)
protected

Definition at line 122 of file class.ilAdvancedMDFieldDefinitionText.php.

References setMaxLength(), and setMulti().

123  {
124  $this->setMaxLength($a_def["max"]);
125  $this->setMulti($a_def["multi"]);
126  }
+ Here is the call graph for this function:

◆ importFromECS()

ilAdvancedMDFieldDefinitionText::importFromECS (   $a_ecs_type,
  $a_value,
  $a_sub_id 
)

Definition at line 252 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilAdvancedMDFieldDefinition\getADT(), ilECSUtils\TYPE_ARRAY, ilECSUtils\TYPE_INT, ilECSUtils\TYPE_STRING, and ilECSUtils\TYPE_TIMEPLACE.

253  {
254  switch ($a_ecs_type) {
256  $value = implode(',', (array) $a_value);
257  break;
258 
260  $value = (int) $a_value;
261  break;
262 
264  $value = (string) $a_value;
265  break;
266 
268  if ($a_value instanceof ilECSTimePlace) {
269  $value = $a_value->{'get' . ucfirst($a_sub_id)}();
270  }
271  break;
272  }
273 
274  if (trim($value)) {
275  $this->getADT()->setText($value);
276  return true;
277  }
278  return false;
279  }
Representation of ECS EContent Time Place.
const TYPE_TIMEPLACE
+ Here is the call graph for this function:

◆ importValueFromXML()

ilAdvancedMDFieldDefinitionText::importValueFromXML (   $a_cdata)
Parameters
string$a_cdata

Definition at line 234 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilAdvancedMDFieldDefinition\getADT().

235  {
236  // an import from release < 7
237  if (strpos($a_cdata, self::XML_SEPARATOR_TRANSLATION) === false) {
238  $this->getADT()->setText($a_cdata);
239  return;
240  }
241 
242  $translations = explode(self::XML_SEPARATOR_TRANSLATIONS, $a_cdata);
243  foreach ($translations as $translation) {
244  $parts = explode(self::XML_SEPARATOR_TRANSLATION, $translation);
245  if ($parts === false) {
246  continue;
247  }
248  $this->getADT()->setTranslation((string) $parts[0], (string) $parts[1]);
249  }
250  }
+ Here is the call graph for this function:

◆ importXMLProperty()

ilAdvancedMDFieldDefinitionText::importXMLProperty (   $a_key,
  $a_value 
)

Definition at line 208 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilAdvancedMDFieldDefinitionGroupBased\getValueForXML(), setMaxLength(), and setMulti().

209  {
210  if ($a_key == "max") {
211  $this->setMaxLength($a_value != "" ? $a_value : null);
212  }
213  if ($a_key == "multi") {
214  $this->setMulti($a_value != "" ? $a_value : null);
215  }
216  }
+ Here is the call graph for this function:

◆ initADTDefinition()

ilAdvancedMDFieldDefinitionText::initADTDefinition ( )
protected
Returns
ilADTDefinition
Exceptions
Exception

Definition at line 58 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilADTFactory\getInstance(), ilAdvancedMDFieldTranslations\getInstanceByRecordId(), getMaxLength(), ilAdvancedMDFieldDefinition\getRecordId(), and ilADTFactory\TYPE_LOCALIZED_TEXT.

59  {
61 
62  $definition = ilADTFactory::getInstance()->getDefinitionInstanceByType(ilADTFactory::TYPE_LOCALIZED_TEXT);
63  $definition->setMaxLength((int) $this->getMaxLength());
64  $definition->setActiveLanguages($field_translations->getActivatedLanguages($this->getFieldId(), true));
65  $definition->setDefaultLanguage($field_translations->getDefaultLanguage());
66  return $definition;
67  }
static getInstance()
Get singleton.
+ Here is the call graph for this function:

◆ isMulti()

ilAdvancedMDFieldDefinitionText::isMulti ( )

Is multi-line?

Returns
bool

Definition at line 112 of file class.ilAdvancedMDFieldDefinitionText.php.

References $multi.

Referenced by addCustomFieldToDefinitionForm(), addPropertiesToXML(), getFieldDefinition(), getFieldDefinitionForTableGUI(), and prepareElementForEditor().

+ Here is the caller graph for this function:

◆ parseSearchObjects()

ilAdvancedMDFieldDefinitionText::parseSearchObjects ( array  $a_records,
array  $a_object_types 
)
protected

Definition at line 296 of file class.ilAdvancedMDFieldDefinitionText.php.

References $DIC, $ilDB, and $res.

Referenced by searchObjects().

297  {
298  global $DIC;
299 
300  $ilDB = $DIC['ilDB'];
301 
302  $res = array();
303 
304  $obj_ids = array();
305  foreach ($a_records as $record) {
306  if ($record["sub_type"] == "-") {
307  // keep found information
308  $obj_ids[$record["obj_id"]] = $record;
309  }
310  }
311 
312  $sql = "SELECT obj_id,type" .
313  " FROM object_data" .
314  " WHERE " . $ilDB->in("obj_id", array_keys($obj_ids), "", "integer") .
315  " AND " . $ilDB->in("type", $a_object_types, "", "text");
316  $set = $ilDB->query($sql);
317  while ($row = $ilDB->fetchAssoc($set)) {
318  $row["found"] = array();
319  foreach ($obj_ids[$row["obj_id"]] as $field => $value) {
320  if (substr($field, 0, 5) == "found") {
321  $row["found"][$field] = $value;
322  }
323  }
324  $res[] = $row;
325  }
326 
327  return $res;
328  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
global $ilDB
+ Here is the caller graph for this function:

◆ prepareElementForEditor()

ilAdvancedMDFieldDefinitionText::prepareElementForEditor ( ilADTFormBridge  $form)

Definition at line 281 of file class.ilAdvancedMDFieldDefinitionText.php.

References isMulti().

282  {
283  if (!$form instanceof ilADTLocalizedTextFormBridge) {
284  $this->logger->warning('Passed ' . get_class($form));
285  return;
286  }
287  $form->setMulti($this->isMulti());
288  }
Class ilADTLocalizedTextDBBridge.
+ Here is the call graph for this function:

◆ searchObjects()

ilAdvancedMDFieldDefinitionText::searchObjects ( ilADTSearchBridge  $a_adt_search,
ilQueryParser  $a_parser,
array  $a_object_types,
  $a_locate,
  $a_search_type 
)

Search.

Parameters
ilADTSearchBridge$a_adt_search
ilQueryParser$a_parser
array$a_object_types
string$a_locate
string$a_search_type
Returns
array

Definition at line 340 of file class.ilAdvancedMDFieldDefinitionText.php.

References ilADTActiveRecordByType\find(), ilAdvancedMDFieldDefinition\getADT(), ilAdvancedMDFieldDefinition\getFieldId(), ilQueryParser\getQuotedWords(), ilADTSearchBridge\getSQLCondition(), getType(), parseSearchObjects(), ilADTActiveRecordByType\SINGLE_COLUMN_NAME, and ilADTTextSearchBridgeSingle\SQL_LIKE.

341  {
342  // :TODO: search type (like, fulltext)
343 
344  include_once('Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php');
345  $condition = $a_adt_search->getSQLCondition(
348  $a_parser->getQuotedWords()
349  );
350  if ($condition) {
352  'adv_md_values',
353  $this->getADT()->getType(),
354  $this->getFieldId(),
355  $condition,
356  $a_locate);
357  if (isset($objects) && count($objects)) {
358  return $this->parseSearchObjects($objects, $a_object_types);
359  }
360  return [];
361  }
362  }
getQuotedWords($with_quotation=false)
static find($a_table, $a_type, $a_field_id, $a_condition, $a_additional_fields=null)
Find entries.
parseSearchObjects(array $a_records, array $a_object_types)
getSQLCondition($a_element_id)
Get SQL condition for current value(s)
+ Here is the call graph for this function:

◆ setMaxLength()

ilAdvancedMDFieldDefinitionText::setMaxLength (   $a_value)

Set max length.

Parameters
int$a_value

Definition at line 79 of file class.ilAdvancedMDFieldDefinitionText.php.

Referenced by importCustomDefinitionFormPostValues(), importFieldDefinition(), and importXMLProperty().

80  {
81  if ($a_value !== null) {
82  $a_value = (int) $a_value;
83  }
84  $this->max_length = $a_value;
85  }
+ Here is the caller graph for this function:

◆ setMulti()

ilAdvancedMDFieldDefinitionText::setMulti (   $a_value)

Set multi-line.

Parameters
string$a_value

Definition at line 102 of file class.ilAdvancedMDFieldDefinitionText.php.

Referenced by importCustomDefinitionFormPostValues(), importFieldDefinition(), and importXMLProperty().

103  {
104  $this->multi = (bool) $a_value;
105  }
+ Here is the caller graph for this function:

Field Documentation

◆ $max_length

ilAdvancedMDFieldDefinitionText::$max_length
protected

Definition at line 22 of file class.ilAdvancedMDFieldDefinitionText.php.

Referenced by getMaxLength().

◆ $multi

ilAdvancedMDFieldDefinitionText::$multi
protected

◆ XML_SEPARATOR_TRANSLATION

const ilAdvancedMDFieldDefinitionText::XML_SEPARATOR_TRANSLATION = '~+~'

Definition at line 17 of file class.ilAdvancedMDFieldDefinitionText.php.

◆ XML_SEPARATOR_TRANSLATIONS

const ilAdvancedMDFieldDefinitionText::XML_SEPARATOR_TRANSLATIONS = "~|~"

Definition at line 16 of file class.ilAdvancedMDFieldDefinitionText.php.


The documentation for this class was generated from the following file: