ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclRecordEditGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once("./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordModel.php");
5require_once("./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseFieldModel.php");
6require_once("./Modules/DataCollection/classes/Table/class.ilDclTable.php");
7require_once("./Modules/DataCollection/classes/Fields/Base/class.ilDclDatatype.php");
8require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
9require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
10require_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
11require_once('./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php');
12require_once('./Modules/DataCollection/classes/Helpers/class.ilDclPropertyFormGUI.php');
13
26
32 const REDIRECT_DETAIL = 2;
36 protected $record_id;
40 protected $table_id;
44 protected $table;
48 protected $parent_obj;
52 protected $record;
56 protected $ctrl;
60 protected $tpl;
64 protected $lng;
68 protected $user;
72 protected $form;
73
74
79 global $DIC;
80 $ilCtrl = $DIC['ilCtrl'];
81 $tpl = $DIC['tpl'];
82 $lng = $DIC['lng'];
83 $ilUser = $DIC['ilUser'];
84
85 $this->ctrl = $ilCtrl;
86 $this->tpl = $tpl;
87 $this->lng = $lng;
88 $this->user = $ilUser;
89 $this->parent_obj = $parent_obj;
90 $this->record_id = $_REQUEST['record_id'];
91 $this->table_id = $_REQUEST['table_id'];
92 $this->tableview_id = $_REQUEST['tableview_id'];
93 }
94
95
99 public function executeCommand() {
100 $this->getRecord();
101
102 $cmd = $this->ctrl->getCmd();
103 switch ($cmd) {
104 default:
105 $this->$cmd();
106 break;
107 }
108
109 return true;
110 }
111
112
116 public function getRecord() {
117 if ($_GET['mode']) {
118 $this->ctrl->saveParameter($this, 'mode');
119 $this->ctrl->setParameterByClass("ildclrecordlistgui", "mode", $_GET['mode']);
120 }
121 $this->ctrl->setParameterByClass('ildclrecordlistgui', 'tableview_id', $this->tableview_id);
122 $this->ctrl->saveParameter($this, 'redirect');
123 if ($this->record_id) {
124 $this->record = ilDclCache::getRecordCache($this->record_id);
125 if (!$this->record->hasPermissionToEdit($this->parent_obj->ref_id) OR !$this->record->hasPermissionToView($this->parent_obj->ref_id)) {
126 $this->accessDenied();
127 }
128 $this->table = $this->record->getTable();
129 $this->table_id = $this->table->getId();
130 } else {
131 $this->table = ilDclCache::getTableCache($this->table_id);
133 $this->accessDenied();
134 }
135 }
136 }
137
138
142 public function create() {
143 $this->initForm();
144 if ($this->ctrl->isAsynch()) {
145 echo $this->form->getHTML();
146 exit();
147 } else {
148 $this->tpl->setContent( $this->getLanguageJsKeys()
149 . $this->form->getHTML());
150 }
151 }
152
153
157 public function edit() {
158 $this->initForm();
159 $this->cleanupTempFiles();
160
161 $this->setFormValues();
162 if ($this->ctrl->isAsynch()) {
163 echo $this->form->getHTML();
164 exit();
165 } else {
166 $this->tpl->setContent($this->getLanguageJsKeys()
167 . $this->form->getHTML());
168 }
169 }
170
171
177 public function confirmDelete() {
178 $conf = new ilConfirmationGUI();
179 $conf->setFormAction($this->ctrl->getFormAction($this));
180 $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_record'));
181 $record = ilDclCache::getRecordCache($this->record_id);
182
183 $all_fields = $this->table->getRecordFields();
184 $record_data = "";
185 foreach($all_fields as $key=>$field) {
186 $field_record = ilDclCache::getRecordFieldCache($record, $field);
187
188 $record_representation = ilDclCache::getRecordRepresentation($field_record);
189 if($record_representation->getConfirmationHTML() !== false) {
190 $record_data .= $field->getTitle().": ".$record_representation->getConfirmationHTML() ."<br />";
191 }
192 }
193 $conf->addItem('record_id', $record->getId(), $record_data);
194 $conf->addHiddenItem('table_id', $this->table_id);
195 $conf->addHiddenItem('tableview_id', $this->tableview_id);
196 $conf->setConfirm($this->lng->txt('delete'), 'delete');
197 $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
198 $this->tpl->setContent($conf->getHTML());
199 }
200
201
205 public function cancelDelete() {
206 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
207 }
208
209
213 public function delete() {
214 $record = ilDclCache::getRecordCache($this->record_id);
215
216 if (!$this->table->hasPermissionToDeleteRecord($this->parent_obj->ref_id, $record)) {
217 $this->accessDenied();
218
219 return;
220 }
221
222 $record->doDelete();
223 ilUtil::sendSuccess($this->lng->txt("dcl_record_deleted"), true);
224 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
225 }
226
227
236 public function getRecordData($record_id = 0) {
237 $record_id = ($record_id) ? $record_id : $_GET['record_id'];
238 $return = array();
239 if ($record_id) {
241 if (is_object($record)) {
242 $return = $record->getRecordFieldValues();
243 }
244 }
245 if ($this->ctrl->isAsynch()) {
246 echo json_encode($return);
247 exit();
248 }
249
250 return $return;
251 }
252
253
259 public function initForm() {
260 $this->form = new ilDclPropertyFormGUI();
261 $prefix = ($this->ctrl->isAsynch()) ? 'dclajax' : 'dcl'; // Used by datacolleciton.js to select input elements
262 $this->form->setId($prefix . $this->table_id . $this->record_id);
263
264 $hidden_prop = new ilHiddenInputGUI("table_id");
265 $hidden_prop->setValue($this->table_id);
266 $this->form->addItem($hidden_prop);
267 $hidden_prop = new ilHiddenInputGUI("tableview_id");
268 $hidden_prop->setValue($this->tableview_id);
269 $this->form->addItem($hidden_prop);
270 if ($this->record_id) {
271 $hidden_prop = new ilHiddenInputGUI("record_id");
272 $hidden_prop->setValue($this->record_id);
273 $this->form->addItem($hidden_prop);
274 }
275
276 $this->ctrl->setParameter($this, "record_id", $this->record_id);
277 $this->form->setFormAction($this->ctrl->getFormAction($this));
278 $allFields = $this->table->getRecordFields();
279 $inline_css = '';
280 foreach ($allFields as $field) {
281 $item = ilDclCache::getFieldRepresentation($field)->getInputField($this->form, $this->record_id);
282 if ($item === NULL) {
283 continue; // Fields calculating values at runtime, e.g. ilDclFormulaFieldModel do not have input
284 }
285
286 if (!ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id) && $field->getLocked()) {
287 $item->setDisabled(true);
288 }
289 $this->form->addItem($item);
290 }
291
292 $this->tpl->addInlineCss($inline_css);
293
294 // Add possibility to change the owner in edit mode
295 if ($this->record_id) {
296 $ownerField = $this->table->getField('owner');
297 $inputfield = ilDclCache::getFieldRepresentation($ownerField)->getInputField($this->form);
298 $this->form->addItem($inputfield);
299 }
300
301
302 // save and cancel commands
303 if ($this->record_id) {
304 $this->form->setTitle($this->lng->txt("dcl_update_record"));
305 $this->form->addCommandButton("save", $this->lng->txt("dcl_update_record"));
306 if (!$this->ctrl->isAsynch()) {
307 $this->form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
308 }
309 } else {
310 $this->form->setTitle($this->lng->txt("dcl_add_new_record"));
311 $this->form->addCommandButton("save", $this->lng->txt("save"));
312 if (!$this->ctrl->isAsynch()) {
313 $this->form->addCommandButton("cancelSave", $this->lng->txt("cancel"));
314 }
315 }
316 $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
317 $this->ctrl->setParameter($this, "table_id", $this->table_id);
318 $this->ctrl->setParameter($this, "record_id", $this->record_id);
319 }
320
321
327 public function setFormValues() {
328 //Get Record-Values
329 $record_obj = ilDclCache::getRecordCache($this->record_id);
330 if ($record_obj->getId()) {
331 //Get Table Field Definitions
332 $allFields = $this->table->getFields();
333 foreach ($allFields as $field) {
334 $record_obj->fillRecordFieldFormInput($field->getId(), $this->form);
335 }
336 } else {
337 $this->form->setValuesByPost();
338 }
339
340 return true;
341 }
342
343
347 public function cancelUpdate() {
348 $this->checkAndPerformRedirect(true);
349 }
350
351
355 public function cancelSave() {
356 $this->cancelUpdate();
357 }
358
359 public function saveConfirmation(ilDclBaseRecordModel $record_obj, $filehash) {
360
361 $permission = ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id);
362 if ($permission) {
363 $all_fields = $this->table->getRecordFields();
364 } else {
365 $all_fields = $this->table->getEditableFields();
366 }
367
368 $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
369 $record_obj->setTableId($this->table_id);
370 $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
371 $record_obj->setLastEditBy($this->user->getId());
372
373 $confirmation = new ilConfirmationGUI();
374 $confirmation->setFormAction($this->ctrl->getFormAction($this));
375 $header_text = $this->lng->txt('dcl_confirm_storing_records');
376 if(!$permission && !ilObjDataCollectionAccess::hasEditAccess($this->parent_obj->ref_id)
377 && !$this->table->getEditByOwner() && !$this->table->getEditPerm())
378 {
379 $header_text .= " ".$this->lng->txt('dcl_confirm_storing_records_no_permission');
380 }
381 $confirmation->setHeaderText($header_text);
382
383 $confirmation->setCancel($this->lng->txt('dcl_edit_record'), 'edit');
384 $confirmation->setConfirm($this->lng->txt('dcl_save_record'), 'save');
385
386 $record_data = "";
387
388 $empty_fileuploads = array();
389 foreach($all_fields as $field) {
390 $record_field = $record_obj->getRecordField($field->getId());
392 $record_field->addHiddenItemsToConfirmation($confirmation);
393
394 if (($record_field instanceof ilDclFileuploadRecordFieldModel || $record_field instanceof ilDclMobRecordFieldModel)
395 && $record_field->getValue() == null) {
396 $empty_fileuploads['field_'.$field->getId()] = array();
397 }
398 $record_representation = ilDclFieldFactory::getRecordRepresentationInstance($record_field);
399
400 if($record_representation->getConfirmationHTML() !== false) {
401 $record_data .= $field->getTitle().": ".$record_representation->getConfirmationHTML() ."<br />";
402 }
403 }
404
405 $confirmation->addHiddenItem('ilfilehash', $filehash);
406 $confirmation->addHiddenItem('empty_fileuploads', htmlspecialchars(json_encode($empty_fileuploads)));
407 $confirmation->addHiddenItem('table_id', $this->table_id);
408 $confirmation->addHiddenItem('tableview_id', $this->tableview_id);
409 $confirmation->addItem('save_confirmed', 1, $record_data);
410
411 if ($this->ctrl->isAsynch()) {
412 echo $confirmation->getHTML();
413 exit();
414 } else {
415 $this->tpl->setContent($confirmation->getHTML());
416 }
417 }
418
422 public function save() {
423 global $DIC;
424 $ilAppEventHandler = $DIC['ilAppEventHandler'];
425 $ilUser = $DIC['ilUser'];
426
427 $this->initForm();
428
429 // if save confirmation is enabled: Temporary file-uploads need to be handled
430 if ($this->table->getSaveConfirmation() && isset($_POST['save_confirmed']) && isset($_POST['ilfilehash']) && !isset($this->record_id) && !$this->ctrl->isAsynch()) {
432
433 //handle empty fileuploads, since $_FILES has to have an entry for each fileuploadGUI
434 if (json_decode($_POST['empty_fileuploads']) && $_POST['empty_fileuploads'] != '') {
435 $_FILES = $_FILES + json_decode($_POST['empty_fileuploads'], true);
436 }
437
438 unset($_SESSION['record_form_values']);
439 }
440
441 $valid = $this->form->checkInput();
442
443 $record_obj = ilDclCache::getRecordCache($this->record_id);
444 $unchanged_obj = $record_obj;
445 $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
446 $record_obj->setTableId($this->table_id);
447 $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
448 $record_obj->setLastEditBy($this->user->getId());
449
450 $create_mode = false;
451
452 if (ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id)) {
453 $all_fields = $this->table->getRecordFields();
454 } else {
455 $all_fields = $this->table->getEditableFields();
456 }
457
458 //Check if we can create this record.
459 foreach ($all_fields as $field) {
460 try {
461 $field->checkValidityFromForm($this->form, $this->record_id);
462 } catch (ilDclInputException $e) {
463 $valid = false;
464 $item = $this->form->getItemByPostVar('field_'.$field->getId());
465 $item->setAlert($e);
466 }
467 }
468
469 if (!$valid) {
470 $this->sendFailure($this->lng->txt('form_input_not_valid'));
471 return;
472 }
473
474 if($valid) {
475 if (!isset($this->record_id)) {
476 if (!(ilObjDataCollectionAccess::hasPermissionToAddRecord($this->parent_obj->ref_id, $this->table_id))) {
477 $this->accessDenied();
478 return;
479 }
480
481 // when save_confirmation is enabled, not yet confirmed and we have not an async-request => prepare for displaying confirmation
482 if ($this->table->getSaveConfirmation() && $this->form->getInput('save_confirmed') == null && !$this->ctrl->isAsynch()) {
483 // temporary store fileuploads (reuse code from ilPropertyFormGUI)
484 $hash = $_POST["ilfilehash"];
485 foreach($_FILES as $field => $data)
486 {
487 if(is_array($data["tmp_name"]))
488 {
489 foreach($data["tmp_name"] as $idx => $upload)
490 {
491 if(is_array($upload))
492 {
493 foreach($upload as $idx2 => $file)
494 {
495 if($file && is_uploaded_file($file))
496 {
497 $file_name = $data["name"][$idx][$idx2];
498 $file_type = $data["type"][$idx][$idx2];
499 $this->form->keepTempFileUpload($hash, $field, $file, $file_name, $file_type, $idx, $idx2);
500 }
501 }
502 }
503 else if($upload && is_uploaded_file($upload))
504 {
505 $file_name = $data["name"][$idx];
506 $file_type = $data["type"][$idx];
507 $this->form->keepTempFileUpload($hash, $field, $upload, $file_name, $file_type, $idx);
508 }
509 }
510 }
511 else
512 {
513 $this->form->keepTempFileUpload($hash, $field, $data["tmp_name"], $data["name"], $data["type"]);
514 }
515 }
516
517 //edit values, they are valid we already checked them above
518 foreach ($all_fields as $field) {
519 $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
520 }
521
522 $this->saveConfirmation($record_obj, $hash);
523 return;
524 }
525
526 $record_obj->setOwner($this->user->getId());
527 $record_obj->setCreateDate($date_obj->get(IL_CAL_DATETIME));
528 $record_obj->setTableId($this->table_id);
529 $record_obj->doCreate();
530
531 $this->record_id = $record_obj->getId();
532 $create_mode = true;
533 } else {
534 if (!$record_obj->hasPermissionToEdit($this->parent_obj->ref_id)) {
535 $this->accessDenied();
536
537 return;
538 }
539 }
540
541 //edit values, they are valid we already checked them above
542 foreach ($all_fields as $field) {
543 $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
544 }
545
546 // Do we need to set a new owner for this record?
547 if (!$create_mode) {
548 $owner_id = ilObjUser::_lookupId($_POST['field_owner']);
549 if (!$owner_id) {
550 $this->sendFailure($this->lng->txt('user_not_known'));
551
552 return;
553 }
554 $record_obj->setOwner($owner_id);
555 }
556
557 $dispatchEvent = "update";
558
559 $dispatchEventData = array(
560 'dcl' => $this->parent_obj->getDataCollectionObject(),
561 'table_id' => $this->table_id,
562 'record_id' => $record_obj->getId(),
563 'record' => $record_obj,
564 );
565
566 if ($create_mode) {
567 $dispatchEvent = "create";
568 ilObjDataCollection::sendNotification("new_record", $this->table_id, $record_obj->getId());
569 } else {
570 $dispatchEventData['prev_record'] = $unchanged_obj;
571 }
572
573 $record_obj->doUpdate($create_mode);
574
575 $ilAppEventHandler->raise('Modules/DataCollection',
576 $dispatchEvent.'Record',
577 $dispatchEventData
578 );
579
580 $this->ctrl->setParameter($this, "table_id", $this->table_id);
581 $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
582 $this->ctrl->setParameter($this, "record_id", $this->record_id);
583
584 if (!$this->ctrl->isAsynch()) {
585 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
586 }
587
589 if ($this->ctrl->isAsynch()) {
590 // If ajax request, return the form in edit mode again
591 $this->record_id = $record_obj->getId();
592 $this->initForm();
593 $this->setFormValues();
594 echo $this->tpl->getMessageHTML($this->lng->txt('msg_obj_modified'), 'success') . $this->form->getHTML();
595 exit();
596 } else {
597 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
598 }
599 } else {
600 // Form not valid...
601 //TODO: URL title flushes on invalid form
602 $this->form->setValuesByPost();
603 if ($this->ctrl->isAsynch()) {
604 echo $this->form->getHTML();
605 exit();
606 } else {
607 $this->tpl->setContent($this->getLanguageJsKeys() . $this->form->getHTML());
608 }
609 }
610 }
611
612
617 protected function checkAndPerformRedirect($force_redirect = false) {
618 if ($force_redirect || (isset($_GET['redirect']) && !$this->ctrl->isAsynch())) {
619 switch ((int)$_GET['redirect']) {
621 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'record_id', $this->record_id);
622 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'table_id', $this->table_id);
623 $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'tableview_id', $this->tableview_id);
624 $this->ctrl->redirectByClass("ilDclDetailedViewGUI", "renderRecord");
625 break;
627 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
628 break;
629 default:
630 $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
631 }
632 }
633 }
634
635
636 protected function accessDenied() {
637 if (!$this->ctrl->isAsynch()) {
638 ilUtil::sendFailure($this->lng->txt('dcl_msg_no_perm_edit'), true);
639 $this->ctrl->redirectByClass('ildclrecordlistgui', 'listRecords');
640 } else {
641 echo $this->lng->txt('dcl_msg_no_perm_edit');
642 exit();
643 }
644 }
645
646
650 protected function sendFailure($message) {
651 $keep = ($this->ctrl->isAsynch()) ? false : true;
652 $this->form->setValuesByPost();
653 if ($this->ctrl->isAsynch()) {
654 echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
655 exit();
656 } else {
657 ilUtil::sendFailure($message, $keep);
658 $this->tpl->setContent($this->getLanguageJsKeys().$this->form->getHTML());
659 }
660 }
661
665 public function searchObjects() {
666 $search = $_POST['search_for'];
667 $dest = $_POST['dest'];
668 $html = "";
669 include_once './Services/Search/classes/class.ilQueryParser.php';
670 $query_parser = new ilQueryParser($search);
671 $query_parser->setMinWordLength(1, true);
672 $query_parser->setCombination(QP_COMBINATION_AND);
673 $query_parser->parse();
674 if (!$query_parser->validate()) {
675 $html .= $query_parser->getMessage() . "<br />";
676 }
677
678 // only like search since fulltext does not support search with less than 3 characters
679 include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
680 $object_search = new ilLikeObjectSearch($query_parser);
681 $res = $object_search->performSearch();
682 //$res->setRequiredPermission('copy');
683 $res->filter(ROOT_FOLDER_ID, true);
684
685 if (!count($results = $res->getResultsByObjId())) {
686 $html .= $this->lng->txt('dcl_no_search_results_found_for') . ' ' . $search . "<br />";
687 }
689
690 foreach ($results as $entry) {
691 $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
692 foreach ((array)$entry['refs'] as $reference) {
693 include_once './Services/Tree/classes/class.ilPathGUI.php';
694 $path = new ilPathGUI();
695 $tpl->setCurrentBlock('result');
696 $tpl->setVariable('RESULT_PATH', $path->getPath(ROOT_FOLDER_ID, $reference) . " ยป " . $entry['title']);
697 $tpl->setVariable('RESULT_REF', $reference);
698 $tpl->setVariable('FIELD_ID', $dest);
699 $tpl->parseCurrentBlock();
700 }
701 $html .= $tpl->get();
702 }
703
704 echo $html;
705 exit;
706 }
707
708 protected function getLanguageJsKeys() {
709 return "<script>ilDataCollection.strings.add_value='" . $this->lng->txt('add_value') . "';</script>";
710 }
711
712
720 protected function parseSearchResults($a_res) {
721 $rows = array();
722 foreach ($a_res as $obj_id => $references) {
723 $r = array();
724 $r['title'] = ilObject::_lookupTitle($obj_id);
725 $r['desc'] = ilObject::_lookupDescription($obj_id);
726 $r['obj_id'] = $obj_id;
727 $r['refs'] = $references;
728 $rows[] = $r;
729 }
730
731 return $rows;
732 }
733
734
738 protected function cleanupTempFiles() {
739 $ilfilehash = (isset($_POST['ilfilehash'])) ? $_POST['ilfilehash'] : null;
740 if ($ilfilehash != null) {
741 $this->form->cleanupTempFiles($ilfilehash);
742 }
743 }
744
745
749 public function getForm() {
750 return $this->form;
751 }
752}
753
754?>
user()
Definition: user.php:4
$path
Definition: aliased.php:25
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
const IL_CAL_DATETIME
const QP_COMBINATION_AND
Confirmation screen class.
@classDescription Date and time handling
Class ilDclBaseRecordModel.
setLastUpdate($a_datetime)
Set Last Update Date.
setRecordFieldValueFromForm($field_id, &$form)
Set a field value.
setCreateDate($a_datetime)
Set Creation Date.
doUpdate($omit_notification=false)
doUpdate
static getRecordFieldCache($record, $field)
static getTableCache($table_id=0)
static getRecordCache($record_id=0)
static getRecordRepresentation(ilDclBaseRecordFieldModel $record_field)
Returns a record representation.
static getFieldRepresentation(ilDclBaseFieldModel $field)
static getRecordRepresentationInstance(ilDclBaseRecordFieldModel $record_field)
Get RecordRepresentation from RecordFieldModel.
Class ilDclBaseFieldModel.
Class ilDclMobRecordFieldModel.
Class ilDclPropertyFormGUI.
static rebuildTempFileByHash($hash)
Return temp files.
Class ilDclRecordEditGUI.
confirmDelete()
Delete confirmation.
parseSearchResults($a_res)
Parse search results.
__construct(ilObjDataCollectionGUI $parent_obj)
getRecordData($record_id=0)
Return All fields and values from a record ID.
searchObjects()
This function is only used by the ajax request if searching for ILIAS references.
cancelDelete()
Cancel deletion.
setFormValues()
Set values from object to form.
cleanupTempFiles()
Cleanup temp-files.
checkAndPerformRedirect($force_redirect=false)
Checkes to what view (table or detail) should be redirected and performs redirect.
const REDIRECT_RECORD_LIST
Possible redirects after saving/updating a record - use GET['redirect'] to set constants.
create()
Create new record gui.
This class represents a hidden form property in a property form.
static hasEditAccess($ref, $user_id=0)
Has permission to view and edit all entries event when he is not the owner.
static hasPermissionToAddRecord($ref_id, $table_id)
Class ilObjDataCollectionGUI.
static _lookupId($a_user_str)
Lookup id by login.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
Creates a path for a start and endnode.
special template class to simplify handling of ITX/PEAR
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$valid
$html
Definition: example_001.php:87
$r
Definition: example_031.php:79
global $ilCtrl
Definition: ilias.php:18
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
$cmd
Definition: sahs_server.php:35
$results
global $DIC
$ilUser
Definition: imgupload.php:18