31 $options[
""] = $this->lng->txt(
'dcl_please_select');
34 foreach ($reftable->getRecords() as $record) {
36 switch ($reffield->getDatatypeId()) {
38 $file_obj =
new ilObjFile($record->getRecordFieldValue($fieldref),
false);
39 $options[$record->getId()] = $file_obj->getFileName();
42 $media_obj =
new ilObjMediaObject($record->getRecordFieldValue($fieldref),
false);
43 $options[$record->getId()] = $media_obj->getTitle();
46 $options[$record->getId()] = strtotime($record->getRecordFieldSingleHTML($fieldref));
48 $options2[$record->getId()] = $record->getRecordFieldSingleHTML($fieldref);
51 $value = $record->getRecordFieldValue($fieldref);
53 if (!is_array($value)) {
54 $value = array(
'title' =>
'',
'link' => $value);
56 $value = $value[
'title'] ? $value[
'title'] : $value[
'link'];
61 $options[$record->getId()] = $record->getRecordFieldRepresentationValue($fieldref);
64 $options[$record->getId()] = $record->getRecordFieldExportValue($fieldref);
83 $input->addCustomAttribute(
'data-ref="1"');
84 $input->addCustomAttribute(
'data-ref-table-id="' . $reftable->getId() .
'"');
85 $input->addCustomAttribute(
'data-ref-field-id="' . $reffield->getId() .
'"');
99 foreach ($ref_table->getRecords() as $record) {
100 $options[$record->getId()] = $record->getRecordFieldPlainText($ref_field_id);
121 if (!$filter || $filter == $value) {
134 $opt = parent::buildFieldCreationInput($dcl, $mode);
139 foreach ($tables as
$table) {
148 $prop_table_selection->setOptions(
$options);
150 $opt->addSubItem($prop_table_selection);
153 $prop_ref_link->setInfo($this->lng->txt(
'dcl_reference_link_info'));
154 $opt->addSubItem($prop_ref_link);
157 $opt->addSubItem($prop_multi_select);
An exception for terminatinating execution or to throw for unit testing.
const PROP_REFERENCE_LINK
Class ilDclBaseFieldRepresentation.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
getFilterInputFieldValue( $input)
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
getField()
Return BaseFieldModel.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
static getTableCache($table_id=0)
static getFieldCache($field_id=0)
const INPUTFORMAT_ILIAS_REF
const INPUTFORMAT_DATETIME
const INPUTFORMAT_REFERENCE
Class ilDclTextFieldRepresentation.
const REFERENCE_SEPARATOR
passThroughFilter(ilDclBaseRecordModel $record, $filter)
Checks if a filter affects a record.
getInputField(ilPropertyFormGUI $form, $record_id=0)
Returns field-input.
addFilterInputFieldToTable(ilTable2GUI $table)
Add filter input to TableGUI.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
@inheritDoc
static hasPermissionToAddRecord($ref_id, $table_id)
Class ilObjDataCollection.
if(empty($password)) $table
if(isset($_POST['submit'])) $form