34 $values = $this->field->getValue();
55 $tpl =
new ilTemplate(
"tpl.reference_list.html",
true,
true,
"Modules/DataCollection");
56 $tpl->setCurrentBlock(
"reference_list");
59 if (!$ref_record->getTableId() || !$record_field->
getField() || !$record_field->
getField()->getTableId()) {
64 $tpl->setCurrentBlock(
"reference");
66 $tpl->setVariable(
"CONTENT", $ref_record->getRecordFieldHTML($record_field->
getField()->getFieldRef()));
70 $tpl->parseCurrentBlock();
73 $tpl->parseCurrentBlock();
84 $values = $this->field->getValue();
93 $tpl =
new ilTemplate(
"tpl.reference_hover.html",
true,
true,
"Modules/DataCollection");
94 $tpl->setCurrentBlock(
"reference_list");
98 if (!$ref_record->getTableId()
or !$record_field->getField()
or !$record_field->getField()->getTableId()) {
100 $record_field->setValue(null);
101 $record_field->doUpdate();
103 $elements[] = array(
'value' => $ref_record->getRecordFieldHTML($this->field->getField()->getFieldRef()),
104 'sort' => $ref_record->getRecordFieldSortingValue($this->field->getField()->getFieldRef()));
110 switch ($ref_field->getDatatypeId()) {
119 foreach ($elements as $element) {
120 if ((strlen(
$html) < $record_field->getMaxReferenceLength())) {
121 $html .= $element[
'value'] .
", ";
125 $tpl->setCurrentBlock(
"reference");
126 $tpl->setVariable(
"CONTENT", $element[
'value']);
127 $tpl->parseCurrentBlock();
134 $tpl->setVariable(
"RECORD_ID", $record_field->getRecord()->getId());
136 $tpl->parseCurrentBlock();
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
Class ilDclBaseFieldModel.
buildTemplate(ilDclNReferenceRecordFieldModel $record_field, $values, $options)
getLinkHTML($link, $value)
setValue($value, $omit_parsing=false)
Set value for record field.
Class ilDclNReferenceFieldGUI.
__construct(ilDclNReferenceRecordFieldModel $field)
special template class to simplify handling of ITX/PEAR
static getRecordCache($record_id=0)
const INPUTFORMAT_DATETIME
getSingleHTML($options=null)