57 $ilToolbar = $DIC[
'ilToolbar'];
59 $ilTabs = $DIC[
'ilTabs'];
60 $locator = $DIC[
'ilLocator'];
62 $table_id =
$_GET[
'table_id'];
64 $this->table_id = $table_id;
65 $this->parent_obj = $a_parent_obj;
66 $this->obj_id = $a_parent_obj->obj_id;
70 $this->tabs = $ilTabs;
71 $this->toolbar = $ilToolbar;
73 $this->ctrl->saveParameter(
'ilDclTableEditGUI',
'table_id');
74 $locator->addItem(
ilDclCache::getTableCache($this->table_id)->getTitle(), $this->ctrl->getLinkTargetByClass(
'ilDclTableEditGUI',
'edit'));
75 $this->tpl->setLocator();
79 $this->ctrl->redirectByClass(
'ildclrecordlistgui',
'listRecords');
89 $cmd = $this->ctrl->getCmd(
'listFields');
104 foreach ($field_ids as $field_id) {
105 $table->deleteField($field_id);
108 $this->ctrl->redirect($this,
'listFields');
114 public function confirmDeleteFields()
116 $this->tabs->clearSubTabs();
118 $conf->setFormAction($this->ctrl->getFormAction($this));
119 $conf->setHeaderText($this->lng->txt(
'dcl_confirm_delete_fields'));
121 foreach ($field_ids as $field_id) {
124 $conf->addItem(
'dcl_field_ids[]', $field_id, $field->getTitle());
126 $conf->setConfirm($this->lng->txt(
'delete'),
'deleteFields');
127 $conf->setCancel($this->lng->txt(
'cancel'),
'listFields');
128 $this->tpl->setContent($conf->getHTML());
137 $fields =
$table->getFields();
141 foreach (array_keys($order) as $field_id) {
142 $order[$field_id] = $val;
147 foreach ($fields as $field) {
148 $field->setLocked(
$_POST[
'locked'][$field->getId()] ==
"on");
149 $field->setExportable(
$_POST[
'exportable'][$field->getId()] ==
"on");
150 $field->setOrder($order[$field->getId()]);
166 $add_new->setPrimary(
true);
167 $add_new->setCaption(
"dcl_add_new_field");
168 $add_new->setUrl($this->ctrl->getLinkTargetByClass(
'ildclfieldeditgui',
'create'));
169 $this->toolbar->addStickyItem($add_new);
171 $this->toolbar->addSeparator();
174 $tables = $this->parent_obj->getDataCollectionObject()->getTables();
176 foreach ($tables as
$table) {
177 $options[$table->getId()] = $table->getTitle();
179 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
181 $table_selection->setOptions(
$options);
182 $table_selection->setValue($this->table_id);
184 $this->toolbar->setFormAction($this->ctrl->getFormActionByClass(
"ilDclFieldListGUI",
"doTableSwitch"));
185 $this->toolbar->addText($this->lng->txt(
"dcl_select"));
186 $this->toolbar->addInputItem($table_selection);
187 $this->toolbar->addFormButton($this->lng->txt(
'change'),
'doTableSwitch');
191 $this->tpl->setContent(
$list->getHTML());
199 $this->ctrl->setParameterByClass(
"ilObjDataCollectionGUI",
"table_id",
$_POST[
'table_id']);
200 $this->ctrl->redirectByClass(
"ilDclFieldListGUI",
"listFields");
218 return $this->parent_obj->getDataCollectionObject();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(isset($_REQUEST['delete'])) $list
static getFieldCache($field_id=0)
static hasAccessToEditTable($ref_id, $table_id)
static getTableCache($table_id=0)
getDataCollectionObject()
deleteFields()
Delete multiple fields.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
executeCommand()
execute command
Class ilDclFieldListTableGUI.
if(empty($password)) $table
__construct(ilDclTableListGUI $a_parent_obj)
Constructor.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.