19 $input->setWidth(100);
20 $input->setWidthUnit(
'%');
30 $options[
""] = $this->lng->txt(
'dcl_please_select');
33 foreach ($reftable->getRecords() as $record) {
35 switch ($reffield->getDatatypeId()) {
37 $file_obj =
new ilObjFile($record->getRecordFieldValue($fieldref),
false);
38 $options[$record->getId()] = $file_obj->getFileName();
41 $media_obj =
new ilObjMediaObject($record->getRecordFieldValue($fieldref),
false);
42 $options[$record->getId()] = $media_obj->
getTitle();
45 $options[$record->getId()] = strtotime($record->getRecordFieldSingleHTML($fieldref));
47 $options2[$record->getId()] = $record->getRecordFieldSingleHTML($fieldref);
50 $value = $record->getRecordFieldValue($fieldref);
52 if (!is_array($value)) {
53 $value =
array(
'title' =>
'',
'link' => $value);
55 $value = $value[
'title'] ? $value[
'title'] : $value[
'link'];
57 $options[$record->getId()] = $value;
60 $options[$record->getId()] = $record->getRecordFieldRepresentationValue($fieldref);
63 $options[$record->getId()] = $record->getRecordFieldExportValue($fieldref);
82 $input->addCustomAttribute(
'data-ref="1"');
83 $input->addCustomAttribute(
'data-ref-table-id="' . $reftable->getId() .
'"');
84 $input->addCustomAttribute(
'data-ref-field-id="' . $reffield->getId() .
'"');
97 foreach ($ref_table->getRecords() as $record) {
98 $options[$record->getId()] = $record->getRecordFieldPlainText($ref_field_id);
102 $options =
array(
'' => $this->lng->txt(
'dcl_any')) + $options;
103 $input->setOptions($options);
119 if (!$filter || $filter == $value) {
131 $opt = parent::buildFieldCreationInput($dcl, $mode);
136 foreach ($tables as
$table) {
137 foreach ($table->getRecordFields() as
$field) {
140 $options[
$field->getId()] = $table->getTitle() . self::REFERENCE_SEPARATOR .
$field->getTitle();
147 $opt->addSubItem($prop_table_selection);
150 $prop_ref_link->
setInfo($this->lng->txt(
'dcl_reference_link_info'));
151 $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
Create styles array
The data for the language used.
const INPUTFORMAT_REFERENCE
getField()
Return BaseFieldModel.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
if(empty($password)) $table
Class ilDclBaseFieldRepresentation.
getFilterInputFieldValue( $input)
Class ilObjDataCollection.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options