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