20 $ilCtrl = $DIC[
'ilCtrl'];
23 $this->
setId(
'dcl_tableviews');
24 $this->
setTitle(
$lng->txt(
'dcl_tableview_fieldsettings'));
25 $this->
addColumn(
$lng->txt(
'dcl_tableview_fieldtitle'), null,
'auto');
26 $this->
addColumn(
$lng->txt(
'dcl_tableview_field_access'), null,
'auto');
27 $this->
addColumn(
$lng->txt(
'dcl_tableview_default_value'), null,
'auto');
29 $ilCtrl->saveParameter($this,
'tableview_id');
30 $this->
setFormAction($ilCtrl->getFormActionByClass(
'ildclcreateviewdefinitiongui'));
36 $this->
setRowTemplate(
'tpl.tableview_create_view.html',
'Modules/DataCollection');
45 $this->
parseData($a_parent_obj->tableview->getFieldSettings());
62 $field = $a_set->getFieldObject();
68 if (!is_null($match)) {
70 $item->setChecked($match->getValue());
72 $item->setValue($match->getValue());
76 if (!$field->isStandardField()) {
77 $this->tpl->setVariable(
'TEXT_VISIBLE',
$lng->txt(
'dcl_tableview_visible'));
78 $this->tpl->setVariable(
'TEXT_REQUIRED_VISIBLE',
$lng->txt(
'dcl_tableview_required_visible'));
79 $this->tpl->setVariable(
'TEXT_LOCKED_VISIBLE',
$lng->txt(
'dcl_tableview_locked_visible'));
80 $this->tpl->setVariable(
'TEXT_NOT_VISIBLE',
$lng->txt(
'dcl_tableview_not_visible'));
81 $this->tpl->setVariable(
'IS_LOCKED', $a_set->isLockedCreate() ?
'checked' :
'');
82 $this->tpl->setVariable(
'IS_REQUIRED', $a_set->isRequiredCreate() ?
'checked' :
'');
83 $this->tpl->setVariable(
'DEFAULT_VALUE', $a_set->getDefaultValue());
84 $this->tpl->setVariable(
'IS_VISIBLE', $a_set->isVisibleCreate() ?
'checked' :
'');
85 $this->tpl->setVariable(
'IS_NOT_VISIBLE', !$a_set->isVisibleCreate() ?
'checked' :
'');
86 if (!is_null($item) && in_array($field->getDatatypeId(), self::VALID_DEFAULT_VALUE_TYPES)) {
87 $name =
"default_" . $a_set->getId() .
"_" . $field->getDatatypeId();
88 $item->setPostVar(
$name);
91 $replacement_box->setPostVar($item->getPostVar());
92 $replacement_box->setValue($item->getValue());
93 $this->tpl->setVariable(
'INPUT', $replacement_box->render());
95 $this->tpl->setVariable(
'INPUT', $item->render());
100 $this->tpl->setVariable(
'EXTRA_INPUT',
"<input type=\"hidden\" name=\"$name\" value=\"0\" />");
104 $this->tpl->setVariable(
'HIDDEN',
'hidden');
107 $this->tpl->setVariable(
'FIELD_ID', $a_set->getField());
108 $this->tpl->setVariable(
'TITLE', $field->getTitle());
109 $this->tpl->parseCurrentBlock();
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
setExternalSorting($a_val)
Set external sorting.
setShowTemplates($a_value)
Toggle templates.
Class ilDclCreateViewDefinitionGUI.
const INPUTFORMAT_BOOLEAN
setExternalSegmentation($a_val)
Set external segmentation.
__construct(ilDclCreateViewDefinitionGUI $a_parent_obj)
Class ilDclCreateViewTableGUI.
static getFieldRepresentation(ilDclBaseFieldModel $field)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
const VALID_DEFAULT_VALUE_TYPES
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static findSingle($data_type_id, $tview_id)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setEnableHeader($a_enableheader)
Set Enable Header.
fillRow($a_set)
Standard Version of Fill Row.
setEnableTitle($a_enabletitle)
Set Enable Title.