ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilDclEditViewTableGUI.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  public function __construct(ilDclEditViewDefinitionGUI $a_parent_obj)
11  {
12  global $DIC;
13  $lng = $DIC['lng'];
14  $ilCtrl = $DIC['ilCtrl'];
15  parent::__construct($a_parent_obj);
16 
17  $this->setId('dcl_tableviews');
18  $this->setTitle($lng->txt('dcl_tableview_fieldsettings'));
19  $this->addColumn($lng->txt('dcl_tableview_fieldtitle'), null, 'auto');
20  $this->addColumn($lng->txt('dcl_tableview_field_access'), null, 'auto');
21 
22  $ilCtrl->saveParameter($this, 'tableview_id');
23  $this->setFormAction($ilCtrl->getFormActionByClass('ildcleditviewdefinitiongui'));
24  $this->addCommandButton('saveTable', $lng->txt('dcl_save'));
25 
26  $this->setExternalSegmentation(true);
27  $this->setExternalSorting(true);
28 
29  $this->setRowTemplate('tpl.tableview_edit_view.html', 'Modules/DataCollection');
30  $this->setTopCommands(true);
31  $this->setEnableHeader(true);
32  $this->setShowRowsSelector(false);
33  $this->setShowTemplates(false);
34  $this->setEnableHeader(true);
35  $this->setEnableTitle(true);
36  $this->setDefaultOrderDirection('asc');
37 
38  $this->parseData($a_parent_obj->tableview->getFieldSettings());
39  }
40 
41 
42  public function parseData($data)
43  {
44  $this->setData($data);
45  }
46 
47 
51  public function fillRow($a_set)
52  {
53  global $DIC;
54  $lng = $DIC['lng'];
55  $field = $a_set->getFieldObject();
56 
57  if (!$field->isStandardField() || $field->getId() === 'owner') {
58  $this->tpl->setVariable('TEXT_VISIBLE', $lng->txt('dcl_tableview_visible'));
59  $this->tpl->setVariable('TEXT_REQUIRED_VISIBLE', $lng->txt('dcl_tableview_required_visible'));
60  $this->tpl->setVariable('TEXT_LOCKED_VISIBLE', $lng->txt('dcl_tableview_locked_visible'));
61  $this->tpl->setVariable('TEXT_NOT_VISIBLE', $lng->txt('dcl_tableview_not_visible'));
62  $this->tpl->setVariable('IS_LOCKED', $a_set->isLockedEdit() ? 'checked' : '');
63  $this->tpl->setVariable('IS_REQUIRED', $a_set->isRequiredEdit() ? 'checked' : '');
64  $this->tpl->setVariable('DEFAULT_VALUE', $a_set->getDefaultValue());
65  $this->tpl->setVariable('IS_VISIBLE', $a_set->isVisibleEdit() ? 'checked' : '');
66  $this->tpl->setVariable('IS_NOT_VISIBLE', !$a_set->isVisibleEdit() ? 'checked' : '');
67  } else {
68  $this->tpl->setVariable('HIDDEN', 'hidden');
69  }
70 
71  $this->tpl->setVariable('FIELD_ID', $a_set->getField());
72  $this->tpl->setVariable('TITLE', $field->getTitle());
73  $this->tpl->parseCurrentBlock();
74  }
75 }
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 ilDclEditViewDefinitionGUI.
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
global $DIC
Definition: goto.php:24
setRowTemplate($a_template, $a_template_dir="")
Set row template.
__construct(ilDclEditViewDefinitionGUI $a_parent_obj)
Class ilDclEditViewTableGUI.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
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.
setEnableTitle($a_enabletitle)
Set Enable Title.