コード例 #1
0
 /**
  * Confirm deletion of multiple fields
  */
 public function confirmDeleteFields()
 {
     $this->tabs->clearSubTabs();
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_fields'));
     $field_ids = isset($_POST['dcl_field_ids']) ? $_POST['dcl_field_ids'] : array();
     foreach ($field_ids as $field_id) {
         /** @var ilDataCollectionField $field */
         $field = ilDataCollectionCache::getFieldCache($field_id);
         $conf->addItem('dcl_field_ids[]', $field_id, $field->getTitle());
     }
     $conf->setConfirm($this->lng->txt('delete'), 'deleteFields');
     $conf->setCancel($this->lng->txt('cancel'), 'listFields');
     $this->tpl->setContent($conf->getHTML());
 }