ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
4 
17 {
18 
24  const REDIRECT_DETAIL = 2;
28  protected $record_id;
32  protected $table_id;
36  protected $table;
40  protected $parent_obj;
44  protected $record;
48  protected $ctrl;
52  protected $tpl;
56  protected $lng;
60  protected $user;
64  protected $form;
65 
66 
71  {
72  global $DIC;
73  $ilCtrl = $DIC['ilCtrl'];
74  $tpl = $DIC['tpl'];
75  $lng = $DIC['lng'];
76  $ilUser = $DIC['ilUser'];
77 
78  $this->ctrl = $ilCtrl;
79  $this->tpl = $tpl;
80  $this->lng = $lng;
81  $this->user = $ilUser;
82  $this->parent_obj = $parent_obj;
83  $this->record_id = $_REQUEST['record_id'];
84  $this->table_id = $_REQUEST['table_id'];
85  $this->tableview_id = $_REQUEST['tableview_id'];
86  }
87 
88 
92  public function executeCommand()
93  {
94  $this->getRecord();
95 
96  $cmd = $this->ctrl->getCmd();
97  switch ($cmd) {
98  default:
99  $this->$cmd();
100  break;
101  }
102 
103  return true;
104  }
105 
106 
110  public function getRecord()
111  {
112  if ($_GET['mode']) {
113  $this->ctrl->saveParameter($this, 'mode');
114  $this->ctrl->setParameterByClass("ildclrecordlistgui", "mode", $_GET['mode']);
115  }
116  $this->ctrl->setParameterByClass('ildclrecordlistgui', 'tableview_id', $this->tableview_id);
117  $this->ctrl->saveParameter($this, 'redirect');
118  if ($this->record_id) {
119  $this->record = ilDclCache::getRecordCache($this->record_id);
120  if (!$this->record->hasPermissionToEdit($this->parent_obj->ref_id) or !$this->record->hasPermissionToView($this->parent_obj->ref_id)) {
121  $this->accessDenied();
122  }
123  $this->table = $this->record->getTable();
124  $this->table_id = $this->table->getId();
125  } else {
126  $this->table = ilDclCache::getTableCache($this->table_id);
128  $this->accessDenied();
129  }
130  }
131  }
132 
133 
137  public function create()
138  {
139  $this->initForm();
140  if ($this->ctrl->isAsynch()) {
141  echo $this->form->getHTML();
142  exit();
143  } else {
144  $this->tpl->setContent($this->getLanguageJsKeys()
145  . $this->form->getHTML());
146  }
147  }
148 
149 
153  public function edit()
154  {
155  $this->initForm();
156  $this->cleanupTempFiles();
157 
158  $this->setFormValues();
159  if ($this->ctrl->isAsynch()) {
160  echo $this->form->getHTML();
161  exit();
162  } else {
163  $this->tpl->setContent($this->getLanguageJsKeys()
164  . $this->form->getHTML());
165  }
166  }
167 
168 
174  public function confirmDelete()
175  {
176  $conf = new ilConfirmationGUI();
177  $conf->setFormAction($this->ctrl->getFormAction($this));
178  $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_record'));
179  $record = ilDclCache::getRecordCache($this->record_id);
180 
181  $all_fields = $this->table->getRecordFields();
182  $record_data = "";
183  foreach ($all_fields as $key=>$field) {
184  $field_record = ilDclCache::getRecordFieldCache($record, $field);
185 
186  $record_representation = ilDclCache::getRecordRepresentation($field_record);
187  if ($record_representation->getConfirmationHTML() !== false) {
188  $record_data .= $field->getTitle() . ": " . $record_representation->getConfirmationHTML() . "<br />";
189  }
190  }
191  $conf->addItem('record_id', $record->getId(), $record_data);
192  $conf->addHiddenItem('table_id', $this->table_id);
193  $conf->addHiddenItem('tableview_id', $this->tableview_id);
194  $conf->setConfirm($this->lng->txt('delete'), 'delete');
195  $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
196  $this->tpl->setContent($conf->getHTML());
197  }
198 
199 
203  public function cancelDelete()
204  {
205  $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
206  }
207 
208 
212  public function delete()
213  {
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  {
238  $record_id = ($record_id) ? $record_id : $_GET['record_id'];
239  $return = array();
240  if ($record_id) {
242  if (is_object($record)) {
243  $return = $record->getRecordFieldValues();
244  }
245  }
246  if ($this->ctrl->isAsynch()) {
247  echo json_encode($return);
248  exit();
249  }
250 
251  return $return;
252  }
253 
254 
260  public function initForm()
261  {
262  $this->form = new ilDclPropertyFormGUI();
263  $prefix = ($this->ctrl->isAsynch()) ? 'dclajax' : 'dcl'; // Used by datacolleciton.js to select input elements
264  $this->form->setId($prefix . $this->table_id . $this->record_id);
265 
266  $hidden_prop = new ilHiddenInputGUI("table_id");
267  $hidden_prop->setValue($this->table_id);
268  $this->form->addItem($hidden_prop);
269  $hidden_prop = new ilHiddenInputGUI("tableview_id");
270  $hidden_prop->setValue($this->tableview_id);
271  $this->form->addItem($hidden_prop);
272  if ($this->record_id) {
273  $hidden_prop = new ilHiddenInputGUI("record_id");
274  $hidden_prop->setValue($this->record_id);
275  $this->form->addItem($hidden_prop);
276  }
277 
278  $this->ctrl->setParameter($this, "record_id", $this->record_id);
279  $this->form->setFormAction($this->ctrl->getFormAction($this));
280  $allFields = $this->table->getRecordFields();
281  $inline_css = '';
282  foreach ($allFields as $field) {
283  $item = ilDclCache::getFieldRepresentation($field)->getInputField($this->form, $this->record_id);
284  if ($item === null) {
285  continue; // Fields calculating values at runtime, e.g. ilDclFormulaFieldModel do not have input
286  }
287 
288  if (!ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id) && $field->getLocked()) {
289  $item->setDisabled(true);
290  }
291  $this->form->addItem($item);
292  }
293 
294  $this->tpl->addInlineCss($inline_css);
295 
296  // Add possibility to change the owner in edit mode
297  if ($this->record_id) {
298  $ownerField = $this->table->getField('owner');
299  $inputfield = ilDclCache::getFieldRepresentation($ownerField)->getInputField($this->form);
300  $this->form->addItem($inputfield);
301  }
302 
303 
304  // save and cancel commands
305  if ($this->record_id) {
306  $this->form->setTitle($this->lng->txt("dcl_update_record"));
307  $this->form->addCommandButton("save", $this->lng->txt("dcl_update_record"));
308  if (!$this->ctrl->isAsynch()) {
309  $this->form->addCommandButton("cancelUpdate", $this->lng->txt("cancel"));
310  }
311  } else {
312  $this->form->setTitle($this->lng->txt("dcl_add_new_record"));
313  $this->form->addCommandButton("save", $this->lng->txt("save"));
314  if (!$this->ctrl->isAsynch()) {
315  $this->form->addCommandButton("cancelSave", $this->lng->txt("cancel"));
316  }
317  }
318  $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
319  $this->ctrl->setParameter($this, "table_id", $this->table_id);
320  $this->ctrl->setParameter($this, "record_id", $this->record_id);
321  }
322 
323 
329  public function setFormValues()
330  {
331  //Get Record-Values
332  $record_obj = ilDclCache::getRecordCache($this->record_id);
333  if ($record_obj->getId()) {
334  //Get Table Field Definitions
335  $allFields = $this->table->getFields();
336  foreach ($allFields as $field) {
337  $record_obj->fillRecordFieldFormInput($field->getId(), $this->form);
338  }
339  } else {
340  $this->form->setValuesByPost();
341  }
342 
343  return true;
344  }
345 
346 
350  public function cancelUpdate()
351  {
352  $this->checkAndPerformRedirect(true);
353  }
354 
355 
359  public function cancelSave()
360  {
361  $this->cancelUpdate();
362  }
363 
364  public function saveConfirmation(ilDclBaseRecordModel $record_obj, $filehash)
365  {
366  $permission = ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id);
367  if ($permission) {
368  $all_fields = $this->table->getRecordFields();
369  } else {
370  $all_fields = $this->table->getEditableFields();
371  }
372 
373  $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
374  $record_obj->setTableId($this->table_id);
375  $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
376  $record_obj->setLastEditBy($this->user->getId());
377 
378  $confirmation = new ilConfirmationGUI();
379  $confirmation->setFormAction($this->ctrl->getFormAction($this));
380  $header_text = $this->lng->txt('dcl_confirm_storing_records');
381  if (!$permission && !ilObjDataCollectionAccess::hasEditAccess($this->parent_obj->ref_id)
382  && !$this->table->getEditByOwner() && !$this->table->getEditPerm()) {
383  $header_text .= " " . $this->lng->txt('dcl_confirm_storing_records_no_permission');
384  }
385  $confirmation->setHeaderText($header_text);
386 
387  $confirmation->setCancel($this->lng->txt('dcl_edit_record'), 'edit');
388  $confirmation->setConfirm($this->lng->txt('dcl_save_record'), 'save');
389 
390  $record_data = "";
391 
392  $empty_fileuploads = array();
393  foreach ($all_fields as $field) {
394  $record_field = $record_obj->getRecordField($field->getId());
396  $record_field->addHiddenItemsToConfirmation($confirmation);
397 
398  if (($record_field instanceof ilDclFileuploadRecordFieldModel || $record_field instanceof ilDclMobRecordFieldModel)
399  && $record_field->getValue() == null) {
400  $empty_fileuploads['field_' . $field->getId()] = array("name" => "", "type" => "", "tmp_name" => "", "error" => 4, "size" => 0);
401  }
402  $record_representation = ilDclFieldFactory::getRecordRepresentationInstance($record_field);
403 
404  if ($record_representation->getConfirmationHTML() !== false) {
405  $record_data .= $field->getTitle() . ": " . $record_representation->getConfirmationHTML() . "<br />";
406  }
407  }
408 
409  $confirmation->addHiddenItem('ilfilehash', $filehash);
410  $confirmation->addHiddenItem('empty_fileuploads', htmlspecialchars(json_encode($empty_fileuploads)));
411  $confirmation->addHiddenItem('table_id', $this->table_id);
412  $confirmation->addHiddenItem('tableview_id', $this->tableview_id);
413  $confirmation->addItem('save_confirmed', 1, $record_data);
414 
415  if ($this->ctrl->isAsynch()) {
416  echo $confirmation->getHTML();
417  exit();
418  } else {
419  $this->tpl->setContent($confirmation->getHTML());
420  }
421  }
422 
426  public function save()
427  {
428  global $DIC;
429  $ilAppEventHandler = $DIC['ilAppEventHandler'];
430  $ilUser = $DIC['ilUser'];
431 
432  $this->initForm();
433 
434  // if save confirmation is enabled: Temporary file-uploads need to be handled
435  if ($this->table->getSaveConfirmation() && isset($_POST['save_confirmed']) && isset($_POST['ilfilehash']) && !isset($this->record_id) && !$this->ctrl->isAsynch()) {
437 
438  //handle empty fileuploads, since $_FILES has to have an entry for each fileuploadGUI
439  if (json_decode($_POST['empty_fileuploads']) && $_POST['empty_fileuploads'] != '') {
440  $_FILES = $_FILES + json_decode($_POST['empty_fileuploads'], true);
441  }
442 
443  unset($_SESSION['record_form_values']);
444  }
445 
446  $valid = $this->form->checkInput();
447 
448  $record_obj = ilDclCache::getRecordCache($this->record_id);
449  $unchanged_obj = $record_obj;
450  $date_obj = new ilDateTime(time(), IL_CAL_UNIX);
451  $record_obj->setTableId($this->table_id);
452  $record_obj->setLastUpdate($date_obj->get(IL_CAL_DATETIME));
453  $record_obj->setLastEditBy($this->user->getId());
454 
455  $create_mode = false;
456 
457  if (ilObjDataCollectionAccess::hasWriteAccess($this->parent_obj->ref_id)) {
458  $all_fields = $this->table->getRecordFields();
459  } else {
460  $all_fields = $this->table->getEditableFields();
461  }
462 
463  //Check if we can create this record.
464  foreach ($all_fields as $field) {
465  try {
466  $field->checkValidityFromForm($this->form, $this->record_id);
467  } catch (ilDclInputException $e) {
468  $valid = false;
469  $item = $this->form->getItemByPostVar('field_' . $field->getId());
470  $item->setAlert($e);
471  }
472  }
473 
474  if (!$valid) {
475  $this->sendFailure($this->lng->txt('form_input_not_valid'));
476  return;
477  }
478 
479  if ($valid) {
480  if (!isset($this->record_id)) {
481  if (!(ilObjDataCollectionAccess::hasPermissionToAddRecord($this->parent_obj->ref_id, $this->table_id))) {
482  $this->accessDenied();
483  return;
484  }
485 
486  // when save_confirmation is enabled, not yet confirmed and we have not an async-request => prepare for displaying confirmation
487  if ($this->table->getSaveConfirmation() && $this->form->getInput('save_confirmed') == null && !$this->ctrl->isAsynch()) {
488  // temporary store fileuploads (reuse code from ilPropertyFormGUI)
489  $hash = $_POST["ilfilehash"];
490  foreach ($_FILES as $field => $data) {
491  if (is_array($data["tmp_name"])) {
492  foreach ($data["tmp_name"] as $idx => $upload) {
493  if (is_array($upload)) {
494  foreach ($upload as $idx2 => $file) {
495  if ($file && is_uploaded_file($file)) {
496  $file_name = $data["name"][$idx][$idx2];
497  $file_type = $data["type"][$idx][$idx2];
498  $this->form->keepTempFileUpload($hash, $field, $file, $file_name, $file_type, $idx, $idx2);
499  }
500  }
501  } elseif ($upload && is_uploaded_file($upload)) {
502  $file_name = $data["name"][$idx];
503  $file_type = $data["type"][$idx];
504  $this->form->keepTempFileUpload($hash, $field, $upload, $file_name, $file_type, $idx);
505  }
506  }
507  } else {
508  $this->form->keepTempFileUpload($hash, $field, $data["tmp_name"], $data["name"], $data["type"]);
509  }
510  }
511 
512  //edit values, they are valid we already checked them above
513  foreach ($all_fields as $field) {
514  $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
515  }
516 
517  $this->saveConfirmation($record_obj, $hash);
518  return;
519  }
520 
521  $record_obj->setOwner($this->user->getId());
522  $record_obj->setCreateDate($date_obj->get(IL_CAL_DATETIME));
523  $record_obj->setTableId($this->table_id);
524  $record_obj->doCreate();
525 
526  $this->record_id = $record_obj->getId();
527  $create_mode = true;
528  } else {
529  if (!$record_obj->hasPermissionToEdit($this->parent_obj->ref_id)) {
530  $this->accessDenied();
531 
532  return;
533  }
534  }
535 
536  //edit values, they are valid we already checked them above
537  foreach ($all_fields as $field) {
538  $record_obj->setRecordFieldValueFromForm($field->getId(), $this->form);
539  }
540 
541  // Do we need to set a new owner for this record?
542  if (!$create_mode) {
543  $owner_id = ilObjUser::_lookupId($_POST['field_owner']);
544  if (!$owner_id) {
545  $this->sendFailure($this->lng->txt('user_not_known'));
546 
547  return;
548  }
549  $record_obj->setOwner($owner_id);
550  }
551 
552  $dispatchEvent = "update";
553 
554  $dispatchEventData = array(
555  'dcl' => $this->parent_obj->getDataCollectionObject(),
556  'table_id' => $this->table_id,
557  'record_id' => $record_obj->getId(),
558  'record' => $record_obj,
559  );
560 
561  if ($create_mode) {
562  $dispatchEvent = "create";
563  ilObjDataCollection::sendNotification("new_record", $this->table_id, $record_obj->getId());
564  } else {
565  $dispatchEventData['prev_record'] = $unchanged_obj;
566  }
567 
568  $record_obj->doUpdate($create_mode);
569 
570  $ilAppEventHandler->raise(
571  'Modules/DataCollection',
572  $dispatchEvent . 'Record',
573  $dispatchEventData
574  );
575 
576  $this->ctrl->setParameter($this, "table_id", $this->table_id);
577  $this->ctrl->setParameter($this, "tableview_id", $this->tableview_id);
578  $this->ctrl->setParameter($this, "record_id", $this->record_id);
579 
580  if (!$this->ctrl->isAsynch()) {
581  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
582  }
583 
584  $this->checkAndPerformRedirect();
585  if ($this->ctrl->isAsynch()) {
586  // If ajax request, return the form in edit mode again
587  $this->record_id = $record_obj->getId();
588  $this->initForm();
589  $this->setFormValues();
590  echo $this->tpl->getMessageHTML($this->lng->txt('msg_obj_modified'), 'success') . $this->form->getHTML();
591  exit();
592  } else {
593  $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
594  }
595  } else {
596  // Form not valid...
597  //TODO: URL title flushes on invalid form
598  $this->form->setValuesByPost();
599  if ($this->ctrl->isAsynch()) {
600  echo $this->form->getHTML();
601  exit();
602  } else {
603  $this->tpl->setContent($this->getLanguageJsKeys() . $this->form->getHTML());
604  }
605  }
606  }
607 
608 
613  protected function checkAndPerformRedirect($force_redirect = false)
614  {
615  if ($force_redirect || (isset($_GET['redirect']) && !$this->ctrl->isAsynch())) {
616  switch ((int) $_GET['redirect']) {
617  case self::REDIRECT_DETAIL:
618  $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'record_id', $this->record_id);
619  $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'table_id', $this->table_id);
620  $this->ctrl->setParameterByClass('ilDclDetailedViewGUI', 'tableview_id', $this->tableview_id);
621  $this->ctrl->redirectByClass("ilDclDetailedViewGUI", "renderRecord");
622  break;
623  case self::REDIRECT_RECORD_LIST:
624  $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
625  break;
626  default:
627  $this->ctrl->redirectByClass("ildclrecordlistgui", "listRecords");
628  }
629  }
630  }
631 
632 
633  protected function accessDenied()
634  {
635  if (!$this->ctrl->isAsynch()) {
636  ilUtil::sendFailure($this->lng->txt('dcl_msg_no_perm_edit'), true);
637  $this->ctrl->redirectByClass('ildclrecordlistgui', 'listRecords');
638  } else {
639  echo $this->lng->txt('dcl_msg_no_perm_edit');
640  exit();
641  }
642  }
643 
644 
648  protected function sendFailure($message)
649  {
650  $keep = ($this->ctrl->isAsynch()) ? false : true;
651  $this->form->setValuesByPost();
652  if ($this->ctrl->isAsynch()) {
653  echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
654  exit();
655  } else {
657  $this->tpl->setContent($this->getLanguageJsKeys() . $this->form->getHTML());
658  }
659  }
660 
664  public function searchObjects()
665  {
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  {
710  return "<script>ilDataCollection.strings.add_value='" . $this->lng->txt('add_value') . "';</script>";
711  }
712 
713 
721  protected function parseSearchResults($a_res)
722  {
723  $rows = array();
724  foreach ($a_res as $obj_id => $references) {
725  $r = array();
726  $r['title'] = ilObject::_lookupTitle($obj_id);
727  $r['desc'] = ilObject::_lookupDescription($obj_id);
728  $r['obj_id'] = $obj_id;
729  $r['refs'] = $references;
730  $rows[] = $r;
731  }
732 
733  return $rows;
734  }
735 
736 
740  protected function cleanupTempFiles()
741  {
742  $ilfilehash = (isset($_POST['ilfilehash'])) ? $_POST['ilfilehash'] : null;
743  if ($ilfilehash != null) {
744  $this->form->cleanupTempFiles($ilfilehash);
745  }
746  }
747 
748 
752  public function getForm()
753  {
754  return $this->form;
755  }
756 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
setFormValues()
Set values from object to form.
Creates a path for a start and endnode.
Class ilDclPropertyFormGUI.
cleanupTempFiles()
Cleanup temp-files.
const IL_CAL_DATETIME
$_SESSION["AccountId"]
static hasPermissionToAddRecord($ref_id, $table_id)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
Class ilDclRecordEditGUI.
$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.
$r
Definition: example_031.php:79
catch(Exception $e) $message
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.
special template class to simplify handling of ITX/PEAR
static getRecordCache($record_id=0)
Date and time handling
confirmDelete()
Delete confirmation.
$ilUser
Definition: imgupload.php:18
static getRecordRepresentation(ilDclBaseRecordFieldModel $record_field)
Returns a record representation.
getRecordData($record_id=0)
Return All fields and values from a record ID.
Create styles array
The data for the language used.
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.
$results
Definition: svg-scanner.php:47
setRecordFieldValueFromForm($field_id, &$form)
Set a field value.
Class ilDclMobRecordFieldModel.
doUpdate($omit_notification=false)
doUpdate
const QP_COMBINATION_AND
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
$key
Definition: croninfo.php:18
$_POST["username"]
$html
Definition: example_001.php:87
Confirmation screen class.