52        $ilToolbar = 
$DIC[
'ilToolbar'];
 
   54        $ilTabs = 
$DIC[
'ilTabs'];
 
   55        $locator = 
$DIC[
'ilLocator'];
 
   57        $table_id = 
$_GET[
'table_id'];
 
   59        $this->table_id = $table_id;
 
   60        $this->parent_obj = $a_parent_obj;
 
   61        $this->obj_id = $a_parent_obj->obj_id;
 
   65        $this->tabs = $ilTabs;
 
   66        $this->toolbar = $ilToolbar;
 
   68        $this->ctrl->saveParameter(
'ilDclTableEditGUI', 
'table_id');
 
   69        $locator->addItem(
ilDclCache::getTableCache($this->table_id)->getTitle(), $this->ctrl->getLinkTargetByClass(
'ilDclTableEditGUI', 
'edit'));
 
   70        $this->tpl->setLocator();
 
   74            $this->ctrl->redirectByClass(
'ildclrecordlistgui', 
'listRecords');
 
   84        $cmd = $this->ctrl->getCmd(
'listFields');
 
   98        $field_ids = isset(
$_POST[
'dcl_field_ids']) ? 
$_POST[
'dcl_field_ids'] : array();
 
  100        foreach ($field_ids as $field_id) {
 
  101            $table->deleteField($field_id);
 
  103        ilUtil::sendSuccess($this->lng->txt(
'dcl_msg_fields_deleted'), 
true);
 
  104        $this->ctrl->redirect($this, 
'listFields');
 
  111    public function confirmDeleteFields()
 
  113        $this->tabs->clearSubTabs();
 
  115        $conf->setFormAction($this->ctrl->getFormAction($this));
 
  116        $conf->setHeaderText($this->lng->txt(
'dcl_confirm_delete_fields'));
 
  117        $field_ids = isset(
$_POST[
'dcl_field_ids']) ? 
$_POST[
'dcl_field_ids'] : array();
 
  118        foreach ($field_ids as $field_id) {
 
  121            $conf->addItem(
'dcl_field_ids[]', $field_id, $field->getTitle());
 
  123        $conf->setConfirm($this->lng->txt(
'delete'), 
'deleteFields');
 
  124        $conf->setCancel($this->lng->txt(
'cancel'), 
'listFields');
 
  125        $this->tpl->setContent($conf->getHTML());
 
  135        $fields = 
$table->getFields();
 
  139        foreach (array_keys($order) as $field_id) {
 
  140            $order[$field_id] = $val;
 
  144        foreach ($fields as $field) {
 
  145            $field->setLocked(
$_POST[
'locked'][$field->getId()] == 
"on");
 
  146            $field->setExportable(
$_POST[
'exportable'][$field->getId()] == 
"on");
 
  147            $field->setOrder($order[$field->getId()]);
 
  152        ilUtil::sendSuccess($this->lng->txt(
"dcl_table_settings_saved"));
 
  164        $add_new->setPrimary(
true);
 
  165        $add_new->setCaption(
"dcl_add_new_field");
 
  166        $add_new->setUrl($this->ctrl->getLinkTargetByClass(
'ildclfieldeditgui', 
'create'));
 
  167        $this->toolbar->addStickyItem($add_new);
 
  169        $this->toolbar->addSeparator();
 
  172        $tables = $this->parent_obj->getDataCollectionObject()->getTables();
 
  174        foreach ($tables as 
$table) {
 
  177        include_once 
'./Services/Form/classes/class.ilSelectInputGUI.php';
 
  179        $table_selection->setOptions(
$options);
 
  180        $table_selection->setValue($this->table_id);
 
  182        $this->toolbar->setFormAction($this->ctrl->getFormActionByClass(
"ilDclFieldListGUI", 
"doTableSwitch"));
 
  183        $this->toolbar->addText($this->lng->txt(
"dcl_select"));
 
  184        $this->toolbar->addInputItem($table_selection);
 
  185        $this->toolbar->addFormButton($this->lng->txt(
'change'), 
'doTableSwitch');
 
  189        $this->tpl->setContent(
$list->getHTML());
 
  198        $this->ctrl->setParameterByClass(
"ilObjDataCollectionGUI", 
"table_id", 
$_POST[
'table_id']);
 
  199        $this->ctrl->redirectByClass(
"ilDclFieldListGUI", 
"listFields");
 
  217        return $this->parent_obj->getDataCollectionObject();
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static getTableCache($table_id=0)
static getFieldCache($field_id=0)
executeCommand()
execute command
deleteFields()
Delete multiple fields.
__construct(ilDclTableListGUI $a_parent_obj)
Constructor.
getDataCollectionObject()
Class ilDclFieldListTableGUI.
static hasAccessToEditTable($ref_id, $table_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(empty($password)) $table
if(isset($_REQUEST['delete'])) $list