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'];
58 $options[$record->getId()] = $value;
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);
104 $options = array(
'' => $this->lng->txt(
'dcl_any')) + $options;
105 $input->setOptions($options);
121 if (!$filter || $filter == $value) {
134 $opt = parent::buildFieldCreationInput($dcl, $mode);
139 foreach ($tables as
$table) {
140 foreach ($table->getRecordFields() as
$field) {
143 $options[
$field->getId()] = $table->getTitle() . self::REFERENCE_SEPARATOR .
$field->getTitle();
150 $opt->addSubItem($prop_table_selection);
153 $prop_ref_link->
setInfo($this->lng->txt(
'dcl_reference_link_info'));
154 $opt->addSubItem($prop_ref_link);
const PROP_REFERENCE_LINK
const REFERENCE_SEPARATOR
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
static hasPermissionToAddRecord($ref_id, $table_id)
addFilterInputFieldToTable(ilTable2GUI $table)
static getFieldCache($field_id=0)
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
static getTableCache($table_id=0)
passThroughFilter(ilDclBaseRecordModel $record, $filter)
Class ilDclTextFieldRepresentation.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
getInputField(ilPropertyFormGUI $form, $record_id=0)
if(isset($_POST['submit'])) $form
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
const INPUTFORMAT_DATETIME
const INPUTFORMAT_ILIAS_REF
const INPUTFORMAT_REFERENCE
getField()
Return BaseFieldModel.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
if(empty($password)) $table
Class ilDclBaseFieldRepresentation.
getFilterInputFieldValue( $input)
Class ilObjDataCollection.