34 $values = $this->field->getValue();
36 if (!$values || !count($values)) {
55 $tpl =
new ilTemplate(
"tpl.reference_list.html",
true,
true,
"Modules/DataCollection");
56 $tpl->setCurrentBlock(
"reference_list");
57 foreach ($values as $value) {
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()));
68 $tpl->setVariable(
"CONTENT", $record_field->
getLinkHTML($options[
'link'][
'name'], $value));
70 $tpl->parseCurrentBlock();
73 $tpl->parseCurrentBlock();
84 $values = $this->field->getValue();
87 if (!$values or !count($values)) {
93 $tpl =
new ilTemplate(
"tpl.reference_hover.html",
true,
true,
"Modules/DataCollection");
94 $tpl->setCurrentBlock(
"reference_list");
96 foreach ($values as $value) {
98 if (!$ref_record->getTableId() or !$record_field->getField() or !$record_field->getField()->getTableId()) {
100 $record_field->setValue(null);
101 $record_field->doUpdate();
104 'value' => $ref_record->getRecordFieldHTML($this->field->getField()->getFieldRef()),
105 'sort' => $ref_record->getRecordFieldSortingValue($this->field->getField()->getFieldRef()),
112 switch ($ref_field->getDatatypeId()) {
121 foreach ($elements as $element) {
122 if ((strlen($html) < $record_field->getMaxReferenceLength())) {
123 $html .= $element[
'value'] .
", ";
127 $tpl->setCurrentBlock(
"reference");
128 $tpl->setVariable(
"CONTENT", $element[
'value']);
129 $tpl->parseCurrentBlock();
132 $html = substr($html, 0, -2);
136 $tpl->setVariable(
"RECORD_ID", $record_field->getRecord()->getId());
137 $tpl->setVariable(
"ALL", $html);
138 $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)
static getRecordCache($record_id=0)
const INPUTFORMAT_DATETIME
getSingleHTML($options=null)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl