ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilBookingReservationsTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 include_once 'Modules/BookingManager/classes/class.ilBookingReservation.php';
6 require_once "Services/Calendar/classes/class.ilCalendarUtil.php";
7 
17 {
18  protected $ref_id; // int
19  protected $filter; // array
20  protected $pool_id; // int
21  protected $show_all; // bool
22  protected $has_schedule; // bool
23  protected $objects; // array
24  protected $group_id; // int
25  protected $advmd; // [array]
26 
38  function __construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_pool_id, $a_show_all, $a_has_schedule, array $a_filter_pre = null, $a_group_id = null)
39  {
40  global $ilCtrl, $lng, $ilUser, $ilAccess;
41 
42  $this->pool_id = $a_pool_id;
43  $this->ref_id = $a_ref_id;
44  $this->show_all = $a_show_all;
45  $this->has_schedule = (bool)$a_has_schedule;
46  $this->group_id = $a_group_id;
47 
48  $this->advmd = ilObjBookingPool::getAdvancedMDFields($this->pool_id);
49 
50  $this->setId("bkrsv".$a_ref_id);
51 
52  parent::__construct($a_parent_obj, $a_parent_cmd);
53 
54  $this->setTitle($lng->txt("book_reservations_list"));
55 
56  $this->addColumn("", "", 1);
57  $this->addColumn($this->lng->txt("title"), "title");
58 
59  $selected = $this->getSelectedColumns();
60  $cols = $this->getSelectableColumns();
61 
62  if($this->has_schedule)
63  {
64  $this->lng->loadLanguageModule("dateplaner");
65 
66  $this->addColumn($this->lng->txt("date"), "date");
67  if(in_array("week", $selected))
68  {
69  $this->addColumn($this->lng->txt("wk_short"), "week");
70  unset($cols["week"]);
71  }
72  if(in_array("weekday", $selected))
73  {
74  $this->addColumn($this->lng->txt("cal_weekday"), "weekday");
75  unset($cols["weekday"]);
76  }
77  $this->addColumn($this->lng->txt("book_schedule_slot"), "slot");
78  $this->addColumn($this->lng->txt("book_no_of_objects"), "counter");
79 
80  $this->setDefaultOrderField("date");
81  $this->setDefaultOrderDirection("asc");
82  }
83  else
84  {
85  $this->addColumn($this->lng->txt("status"), "status");
86 
87  $this->setDefaultOrderField("title");
88  $this->setDefaultOrderDirection("asc");
89  }
90 
91  foreach($this->getSelectedColumns() as $col)
92  {
93  if(array_key_exists($col, $cols))
94  {
95  $this->addColumn($cols[$col]["txt"], $col);
96  }
97  }
98 
99  $this->addColumn($this->lng->txt("user"), "user_name");
100  $this->addColumn($this->lng->txt("actions"));
101 
102  $this->setEnableHeader(true);
103  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
104  $this->setRowTemplate("tpl.booking_reservation_row.html", "Modules/BookingManager");
105  $this->setResetCommand("resetLogFilter");
106  $this->setFilterCommand("applyLogFilter");
107  $this->setDisableFilterHiding(true);
108 
109  $this->initFilter($a_filter_pre);
110 
111  if($this->group_id)
112  {
113  $this->setLimit(9999);
114  $this->disable("numinfo");
115  $this->filters = array();
116  }
117  else
118  {
119  $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
120  }
121 
122  if($ilUser->getId() != ANONYMOUS_USER_ID)
123  {
124  /*
125  if($ilAccess->checkAccess('write', '', $this->ref_id))
126  {
127  $this->addMultiCommand('rsvInUse', $lng->txt('book_set_in_use'));
128  $this->addMultiCommand('rsvNotInUse', $lng->txt('book_set_not_in_use'));
129  }
130  */
131 
132  $this->addMultiCommand('rsvConfirmCancel', $lng->txt('book_set_cancel'));
133  // $this->addMultiCommand('rsvUncancel', $lng->txt('book_set_not_cancel'));
134  $this->setSelectAllCheckbox('mrsv');
135  }
136 
137  $this->getItems($this->getCurrentFilter());
138 
140  }
141 
142  function getSelectableColumns($a_only_advmd = false)
143  {
144  $cols = array();
145 
146  if($this->has_schedule &&
147  !(bool)$a_only_advmd)
148  {
149  $this->lng->loadLanguageModule("dateplaner");
150 
151  $cols["week"] = array(
152  "txt" => $this->lng->txt("wk_short"),
153  "default" => true
154  );
155 
156  $cols["weekday"] = array(
157  "txt" => $this->lng->txt("cal_weekday"),
158  "default" => true
159  );
160  }
161 
162  foreach($this->advmd as $field)
163  {
164  $cols["advmd".$field["id"]] = array(
165  "txt" => $field["title"],
166  "default" => false
167  );
168  }
169 
170  return $cols;
171  }
172 
173 
177  function initFilter(array $a_filter_pre = null)
178  {
179  if(is_array($a_filter_pre) &&
180  isset($a_filter_pre["object"]))
181  {
182  $_SESSION["form_".$this->getId()]["object"] = serialize($a_filter_pre["object"]);
183  }
184 
185  $this->objects = array();
186  include_once "Modules/BookingManager/classes/class.ilBookingObject.php";
187  foreach(ilBookingObject::getList($this->pool_id) as $item)
188  {
189  $this->objects[$item["booking_object_id"]] = $item["title"];
190  }
191  $item = $this->addFilterItemByMetaType("object", ilTable2GUI::FILTER_SELECT);
192  $item->setOptions(array(""=>$this->lng->txt('book_all'))+$this->objects);
193  $this->filter["object"] = $item->getValue();
194 
196  "title",
198  false,
199  $this->lng->txt("object")." ".$this->lng->txt("title")."/".$this->lng->txt("description")
200  );
201  $this->filter["title"] = $title->getValue();
202 
203  if($this->has_schedule)
204  {
205  // default period: from:today [ to:(today + n days) ]
206  if(!$_SESSION["form_".$this->getId()]["fromto"])
207  {
208  $from = new ilDateTime(date("Y-m-d"), IL_CAL_DATE); // today
209  $to = null;
210 
211  // add period end from pool settings?
212  include_once "Modules/BookingManager/classes/class.ilObjBookingPool.php";
213  $bpool = new ilObjBookingPool($this->pool_id, false);
214  $period = $bpool->getReservationFilterPeriod();
215  if($period !== null)
216  {
217  $to = clone $from;
218  if($period)
219  {
220  $to->increment(ilDateTime::DAY, $period);
221  }
222  $to = serialize($to);
223  }
224 
225  $_SESSION["form_".$this->getId()]["fromto"] = serialize(array(
226  "from" => serialize($from),
227  "to" => $to
228  ));
229  }
230 
231  $item = $this->addFilterItemByMetaType("fromto", ilTable2GUI::FILTER_DATE_RANGE, false, $this->lng->txt('book_fromto'));
232  $this->filter["fromto"] = $item->getDate();
233 
234  // only needed for full log
235  if($this->show_all)
236  {
237  // see ilObjBookingPoolGUI::buildDatesBySchedule()
238  $map = array_flip(array('su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'));
239 
240  $options = array(""=>$this->lng->txt('book_all'));
241 
242  // schedule to slot
243  require_once "Modules/BookingManager/classes/class.ilBookingSchedule.php";
244  foreach(ilBookingSchedule::getList($this->pool_id) as $def)
245  {
246  $schedule = new ilBookingSchedule($def["booking_schedule_id"]);
247  foreach($schedule->getDefinition() as $day => $slots)
248  {
249  $day_caption = ilCalendarUtil::_numericDayToString($map[$day], false);
250 
251  foreach($slots as $slot)
252  {
253  $idx = $map[$day]."_".$slot;
254  $options[$idx] = $day_caption.", ".$slot;
255  }
256  }
257  }
258 
259  ksort($options);
260 
261  $item = $this->addFilterItemByMetaType("book_schedule_slot", ilTable2GUI::FILTER_SELECT);
262  $item->setOptions($options);
263  $this->filter["slot"] = $item->getValue();
264  }
265  }
266 
267  $item = new ilCheckboxInputGUI($this->lng->txt("book_filter_past_reservations"), "past");
268  $this->addFilterItem($item);
269  $item->readFromSession();
270 
271  // if period starts in the past we have to include past reservations
272  // :TODO: to be discussed
273  if(is_object($this->filter["fromto"]["from"]) &&
274  $this->filter["fromto"]["from"]->get(IL_CAL_DATE) < date("Y-m-d"))
275  {
276  $item->setChecked(true);
277  }
278 
279  $this->filter["past"] = $item->getChecked();
280 
281  // status
284  if(!$this->has_schedule)
285  {
286  $options = array(""=>$this->lng->txt('book_all'));
287  }
288  else
289  {
290  $options = array();
291  }
292  foreach($valid_status as $loop)
293  {
294  if($loop > 0)
295  {
296  $options[$loop] = $this->lng->txt('book_reservation_status_'.$loop);
297  }
298  else
299  {
300  $options[$loop] = $this->lng->txt('book_not').' '.$this->lng->txt('book_reservation_status_'.-$loop);
301  }
302  }
303  $item = $this->addFilterItemByMetaType("status", ilTable2GUI::FILTER_SELECT);
304  $item->setOptions($options);
305  $this->filter["status"] = $item->getValue();
306 
307  // only needed for full log
308  if($this->show_all)
309  {
310  $options = array(""=>$this->lng->txt('book_all'))+
311  ilBookingReservation::getUserFilter(array_keys($this->objects));
312  $item = $this->addFilterItemByMetaType("user", ilTable2GUI::FILTER_SELECT);
313  $item->setOptions($options);
314  $this->filter["user_id"] = $item->getValue();
315  }
316  }
317 
322  function getCurrentFilter()
323  {
324  $filter = array();
325  if($this->filter["object"])
326  {
327  $filter["object"] = $this->filter["object"];
328  }
329  if($this->filter["title"])
330  {
331  $filter["title"] = $this->filter["title"];
332  }
333  if($this->filter["status"])
334  {
335  $filter["status"] = $this->filter["status"];
336  }
337  if($this->filter["user_id"])
338  {
339  $filter["user_id"] = $this->filter["user_id"];
340  }
341 
342  if($this->has_schedule)
343  {
344  if(!$filter["status"])
345  {
346  // needs distinct status because of aggregation
348  }
349  if($this->filter["slot"])
350  {
351  $filter["slot"] = $this->filter["slot"];
352  }
353 
354  if($this->filter["fromto"]["from"] || $this->filter["fromto"]["to"])
355  {
356  if($this->filter["fromto"]["from"])
357  {
358  $filter["from"] = $this->filter["fromto"]["from"]->get(IL_CAL_UNIX);
359  }
360  if($this->filter["fromto"]["to"])
361  {
362  $day_end = new ilDateTime($this->filter["fromto"]["to"]->get(IL_CAL_DATE)." 23:59:59", IL_CAL_DATETIME);
363  $filter["to"] = $day_end->get(IL_CAL_UNIX);
364  }
365  }
366 
367  $filter["past"] = (bool)$this->filter["past"];
368  }
369 
370  return $filter;
371  }
372 
373  function numericOrdering($a_field)
374  {
375  return in_array($a_field, array("counter", "date", "week", "weekday"));
376  }
377 
383  {
384  global $ilUser;
385 
386  if(!$filter["object"])
387  {
388  $ids = array_keys($this->objects);
389  }
390  else
391  {
392  $ids = array($filter["object"]);
393  }
394 
395  if(!$this->show_all)
396  {
397  $filter["user_id"] = $ilUser->getId();
398  }
399 
400  include_once "Modules/BookingManager/classes/class.ilBookingReservation.php";
401  $data = ilBookingReservation::getListByDate($this->has_schedule, $ids, $filter);
402 
403  if($this->advmd)
404  {
405  // advanced metadata
406  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
407  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_FILTER, "book", $this->pool_id, "bobj");
408  $this->record_gui->setTableGUI($this);
409  $this->record_gui->parse();
410 
411  foreach(array_keys($data) as $idx)
412  {
413  $data[$idx]["pool_id"] = $this->pool_id;
414  }
415 
416  include_once("./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php");
417  $data = ilAdvancedMDValues::queryForRecords($this->pool_id, "bobj", $data, "pool_id", "object_id", $this->record_gui->getFilterElements());
418  }
419 
420  $this->setData($data);
421  }
422 
423  public function getAdvMDRecordGUI()
424  {
425  return $this->record_gui;
426  }
427 
428  public function getOrderField()
429  {
430  $field = parent::getOrderField();
431 
432  // #16560 - this will enable matchting slot sorting to date/week
433  if(in_array($field, array("date", "week")))
434  {
435  $field = "_sortdate";
436  }
437 
438  return $field;
439  }
440 
445  protected function fillRow($a_set)
446  {
447  global $lng, $ilAccess, $ilCtrl, $ilUser;
448 
449  $selected = $this->getSelectedColumns();
450 
451  $this->tpl->setVariable("TXT_TITLE", $a_set["title"]);
452 
453  $can_be_cancelled = (($ilAccess->checkAccess('write', '', $this->ref_id) ||
454  $a_set['user_id'] == $ilUser->getId()) &&
455  $a_set["can_be_cancelled"]);
456 
457  if($can_be_cancelled)
458  {
459  $this->tpl->setVariable("MULTI_ID", $a_set["booking_reservation_id"]);
460  }
461 
462  // #11995
463  $uname = $a_set["user_name"];
464  if(!trim($uname))
465  {
466  $uname = "[".$lng->txt("user_deleted")."]";
467  }
468  else
469  {
470  //$ilCtrl->setParameter($this->parent_obj, 'user_id', $a_set['user_id']);
471  //$this->tpl->setVariable("HREF_PROFILE", $ilCtrl->getLinkTarget($this->parent_obj, 'showprofile'));
472  //$ilCtrl->setParameter($this->parent_obj, 'user_id', '');
473  include_once("./Services/User/classes/class.ilUserUtil.php");
474  $uname = ilUserUtil::getNamePresentation($a_set['user_id'], false, true, "", true);
475  }
476  $this->tpl->setVariable("TXT_CURRENT_USER", $uname);
477 
478  if($this->has_schedule)
479  {
480  $this->tpl->setVariable("VALUE_DATE", ilDatePresentation::formatDate(new ilDate($a_set["date"], IL_CAL_DATE)));
481  if(in_array("week", $selected))
482  {
483  $this->tpl->setVariable("VALUE_WEEK", $a_set["week"]);
484  }
485  if(in_array("weekday", $selected))
486  {
487  $this->tpl->setVariable("VALUE_WEEKDAY", ilCalendarUtil::_numericDayToString($a_set["weekday"], false));
488  }
489  $this->tpl->setVariable("VALUE_SLOT", $a_set["slot"]);
490  $this->tpl->setVariable("VALUE_COUNTER", $a_set["counter"]);
491  }
492  else
493  {
495  {
496  $this->tpl->setVariable("TXT_STATUS", $lng->txt('book_reservation_status_'.$a_set['status']));
497  }
498  else
499  {
500  $this->tpl->setVariable("TXT_STATUS", "&nbsp;");
501  }
502  }
503 
504  if($this->advmd)
505  {
506  foreach($this->advmd as $item)
507  {
508  $advmd_id = (int)$item["id"];
509 
510  if(!in_array("advmd".$advmd_id, $selected))
511  {
512  continue;
513  }
514 
515  $val = " ";
516  if(isset($a_set["md_".$advmd_id."_presentation"]))
517  {
518  $pb = $a_set["md_".$advmd_id."_presentation"]->getList();
519  if($pb)
520  {
521  $val = $pb;
522  }
523  }
524 
525  $this->tpl->setCurrentBlock("advmd_bl");
526  $this->tpl->setVariable("VALUE_ADVMD", $val);
527  $this->tpl->parseCurrentBlock();
528  }
529  }
530 
531  if($can_be_cancelled)
532  {
533  $ilCtrl->setParameter($this->parent_obj, 'reservation_id', $a_set['booking_reservation_id']);
534  $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, 'rsvConfirmCancel'));
535  $ilCtrl->setParameter($this->parent_obj, 'reservation_id', "");
536  $this->tpl->setVariable("TXT_ACTION", $lng->txt('book_set_cancel'));
537  }
538 
539  /* advsellist version
540  if (!$this->has_schedule || $date_to->get(IL_CAL_UNIX) > time())
541  {
542  include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
543  $alist = new ilAdvancedSelectionListGUI();
544  $alist->setId($a_set['booking_reservation_id']);
545  $alist->setListTitle($lng->txt("actions"));
546 
547  $ilCtrl->setParameter($this->parent_obj, 'reservation_id', $a_set['booking_reservation_id']);
548 
549  if(!$a_set['group_id'])
550  {
551  if($ilAccess->checkAccess('write', '', $this->ref_id))
552  {
553  if($a_set['status'] == ilBookingReservation::STATUS_CANCELLED)
554  {
555  // can be uncancelled?
556  // if(ilBookingReservation::getAvailableObject(array($a_set['object_id']), $date_from->get(IL_CAL_UNIX), $date_to->get(IL_CAL_UNIX)))
557  // {
558  // $alist->addItem($lng->txt('book_set_not_cancel'), 'not_cancel', $ilCtrl->getLinkTarget($this->parent_obj, 'rsvUncancel'));
559  // }
560  }
561  else if($a_set['status'] != ilBookingReservation::STATUS_IN_USE)
562  {
563  if($this->has_schedule)
564  {
565  $alist->addItem($lng->txt('book_set_in_use'), 'in_use', $ilCtrl->getLinkTarget($this->parent_obj, 'rsvInUse'));
566  }
567  $alist->addItem($lng->txt('book_set_cancel'), 'cancel', $ilCtrl->getLinkTarget($this->parent_obj, 'rsvConfirmCancel'));
568  }
569  else if($this->has_schedule)
570  {
571  $alist->addItem($lng->txt('book_set_not_in_use'), 'not_in_use', $ilCtrl->getLinkTarget($this->parent_obj, 'rsvNotInUse'));
572  }
573  }
574  else if($a_set['user_id'] == $ilUser->getId() && $a_set['status'] != ilBookingReservation::STATUS_CANCELLED)
575  {
576  $alist->addItem($lng->txt('book_set_cancel'), 'cancel', $ilCtrl->getLinkTarget($this->parent_obj, 'rsvConfirmCancel'));
577  }
578  }
579  else if($ilAccess->checkAccess('write', '', $this->ref_id) || $a_set['user_id'] == $ilUser->getId())
580  {
581  $alist->addItem($lng->txt('details'), 'details', $ilCtrl->getLinkTarget($this->parent_obj, 'logDetails'));
582  }
583 
584  if(sizeof($alist->getItems()))
585  {
586  if(!$a_set['group_id'])
587  {
588  $this->tpl->setVariable('MULTI_ID', $a_set['booking_reservation_id']);
589  }
590  $this->tpl->setVariable('LAYER', $alist->getHTML());
591  }
592  }
593  */
594  }
595 
596  protected function fillHeaderExcel(ilExcel $a_excel, &$a_row)
597  {
598  $a_excel->setCell($a_row, 0, $this->lng->txt("title"));
599  $col = 0;
600  if($this->has_schedule)
601  {
602  $a_excel->setCell($a_row, ++$col, $this->lng->txt("date"));
603  $a_excel->setCell($a_row, ++$col, $this->lng->txt("wk_short"));
604  $a_excel->setCell($a_row, ++$col, $this->lng->txt("cal_weekday"));
605  $a_excel->setCell($a_row, ++$col, $this->lng->txt("book_schedule_slot"));
606  $a_excel->setCell($a_row, ++$col, $this->lng->txt("book_no_of_objects"));
607  }
608  else
609  {
610  $a_excel->setCell($a_row, ++$col, $this->lng->txt("status"));
611  }
612 
613  foreach($this->getSelectableColumns(true) as $advmd_col)
614  {
615  $a_excel->setCell($a_row, ++$col, $advmd_col["txt"]);
616  }
617 
618  $a_excel->setCell($a_row, ++$col, $this->lng->txt("user"));
619 
620  $a_excel->setBold("A".$a_row.":".$a_excel->getColumnCoord($col-1).$a_row);
621  }
622 
623  protected function fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
624  {
625  $a_excel->setCell($a_row, 0, $a_set["title"]);
626  $col = 0;
627  if($this->has_schedule)
628  {
629  $a_excel->setCell($a_row, ++$col, new ilDate($a_set["date"], IL_CAL_DATE));
630  $a_excel->setCell($a_row, ++$col, $a_set["week"]);
631  $a_excel->setCell($a_row, ++$col, ilCalendarUtil::_numericDayToString($a_set["weekday"], false));
632  $a_excel->setCell($a_row, ++$col, $a_set["slot"]);
633  $a_excel->setCell($a_row, ++$col, $a_set["counter"]);
634  }
635  else
636  {
637  $status = "";
639  {
640  $status = $this->lng->txt('book_reservation_status_'.$a_set['status']);
641  }
642  $a_excel->setCell($a_row, ++$col, $status);
643  }
644  $a_excel->setCell($a_row, ++$col, $a_set['user_name']);
645 
646  if($this->advmd)
647  {
648  foreach($this->advmd as $item)
649  {
650  $advmd_id = (int)$item["id"];
651  $val = " ";
652  if(isset($a_set["md_".$advmd_id."_presentation"]))
653  {
654  $pb = $a_set["md_".$advmd_id."_presentation"]->getList();
655  if($pb)
656  {
657  $val = $pb;
658  }
659  }
660  $a_excel->setCell($a_row, ++$col, $val);
661  }
662  }
663  }
664 
665  protected function fillHeaderCSV($a_csv)
666  {
667  $a_csv->addColumn($this->lng->txt("title"));
668  if($this->has_schedule)
669  {
670  $a_csv->addColumn($this->lng->txt("date"));
671  $a_csv->addColumn($this->lng->txt("wk_short"));
672  $a_csv->addColumn($this->lng->txt("cal_weekday"));
673  $a_csv->addColumn($this->lng->txt("book_schedule_slot"));
674  $a_csv->addColumn($this->lng->txt("book_no_of_objects"));
675  }
676  else
677  {
678  $a_csv->addColumn($this->lng->txt("status"));
679  }
680 
681  foreach($this->getSelectableColumns(true) as $advmd_col)
682  {
683  $a_csv->addColumn($advmd_col["txt"]);
684  }
685 
686  $a_csv->addColumn($this->lng->txt("user"));
687  $a_csv->addRow();
688  }
689 
690  protected function fillRowCSV($a_csv, $a_set)
691  {
692  $a_csv->addColumn($a_set["title"]);
693  if($this->has_schedule)
694  {
695  $a_csv->addColumn(ilDatePresentation::formatDate(new ilDate($a_set["date"], IL_CAL_DATE)));
696  $a_csv->addColumn($a_set["week"]);
697  $a_csv->addColumn(ilCalendarUtil::_numericDayToString($a_set["weekday"], false));
698  $a_csv->addColumn($a_set["slot"]);
699  $a_csv->addColumn($a_set["counter"]);
700  }
701  else
702  {
703  $status = "";
705  {
706  $status = $this->lng->txt('book_reservation_status_'.$a_set['status']);
707  }
708  $a_csv->addColumn($status);
709  }
710 
711  if($this->advmd)
712  {
713  foreach($this->advmd as $item)
714  {
715  $advmd_id = (int)$item["id"];
716  $val = " ";
717  if(isset($a_set["md_".$advmd_id."_presentation"]))
718  {
719  $pb = $a_set["md_".$advmd_id."_presentation"]->getList();
720  if($pb)
721  {
722  $val = $pb;
723  }
724  }
725  $a_csv->addColumn($val);
726  }
727  }
728 
729  $a_csv->addColumn($a_set['user_name']);
730  $a_csv->addRow();
731  }
732 }
733 
734 ?>
initFilter()
Init filter.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
initFilter(array $a_filter_pre=null)
Init filter.
setExportFormats(array $formats)
Set available export formats.
const IL_CAL_DATETIME
$_SESSION["AccountId"]
static getList($a_pool_id, $a_title=null)
Get list of booking objects for given type.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
static _numericDayToString($a_day, $a_long=true)
get
static getUserFilter(array $a_object_ids)
Get all users who have reservations for object(s)
getSelectableColumns()
Get selectable columns.
getItems(array $filter)
Gather data and build rows.
schedule for booking ressource
This class represents a checkbox property in a property form.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
static setUseRelativeDates($a_status)
set use relative dates
Class ilObjBookingPool.
const IL_CAL_UNIX
static getListByDate($a_has_schedule, array $a_object_ids, array $filter=null)
List all reservations by date.
setId($a_val)
Set id.
static getAdvancedMDFields($a_glossary_id)
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
Class ilTable2GUI.
Class for single dates.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
getColumnCoord($a_col)
Get column "name" from number.
if(!is_array($argv)) $options
setBold($a_coords)
Set cell(s) to bold.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
addMultiCommand($a_cmd, $a_text)
Add Command button.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
$ilUser
Definition: imgupload.php:18
getSelectedColumns()
Get selected columns.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setCell($a_row, $a_col, $a_value)
Set cell value.
static queryForRecords($a_obj_id, $a_subtype, $a_records, $a_obj_id_key, $a_obj_subid_key, array $a_amet_filter=null)
Query data for given object records.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
const IL_CAL_DATE
disable($a_module_name)
diesables particular modules of table
fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
global $lng
Definition: privfeed.php:17
setEnableHeader($a_enableheader)
Set Enable Header.
__construct($a_parent_obj, $a_parent_cmd, $a_ref_id, $a_pool_id, $a_show_all, $a_has_schedule, array $a_filter_pre=null, $a_group_id=null)
Constructor.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
getId()
Get element id.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
static getList($a_pool_id)
Get list of booking objects for given pool.
setLimit($a_limit=0, $a_default_limit=0)
setFilterCommand($a_val, $a_caption=null)
Set filter command.