ILIAS  release_4-4 Revision
ilCalendarBlockGUI Class Reference

Calendar blocks, displayed in different contexts, e.g. More...

+ Inheritance diagram for ilCalendarBlockGUI:
+ Collaboration diagram for ilCalendarBlockGUI:

Public Member Functions

 ilCalendarBlockGUI ($a_skip_init=false)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 setEnableEdit ($a_enable_edit=0)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 fillDataSection ()
 Fill data section. More...
 
 addMiniMonth ($a_tpl)
 Add mini version of monthly overview (Maybe extracted to another class, if used in pd calendar tab. More...
 
 getHTML ()
 Get bloch HTML code. More...
 
 getOverview ()
 Get overview. More...
 
 addCloseCommand ($a_content_block)
 
 setSeed ()
 Set seed. More...
 
 returnToUpperContext ()
 Return to upper context. More...
 
 showCalendarSubscription ()
 
 fillFooter ()
 
 setFooterLinks ()
 
 setPdModeEvents ()
 
 setPdModeMonth ()
 
 getData ()
 
- Public Member Functions inherited from ilBlockGUI
 ilBlockGUI ()
 Constructor. More...
 
 addHeaderLink ($a_href, $a_text, $status=true)
 
 getHeaderLinks ()
 
 setData ($a_data)
 Set Data. More...
 
 getData ()
 Get Data. More...
 
 setBigMode ($a_bigmode)
 Set Big Mode. More...
 
 getBigMode ()
 Get Big Mode. More...
 
 setBlockId ($a_block_id=0)
 Set Block Id. More...
 
 getBlockId ()
 Get Block Id. More...
 
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels. More...
 
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level. More...
 
 setGuiObject (&$a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 Get GuiObject. More...
 
 getCurrentDetailLevel ()
 Get Current Detail Level. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setImage ($a_image)
 Set Image. More...
 
 getImage ()
 Get Image. More...
 
 setOffset ($a_offset)
 Set Offset. More...
 
 getOffset ()
 Get Offset. More...
 
 correctOffset ()
 
 setLimit ($a_limit)
 Set Limit. More...
 
 getLimit ()
 Get Limit. More...
 
 setEnableEdit ($a_enableedit)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode. More...
 
 getRepositoryMode ()
 Get RepositoryMode. More...
 
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info. More...
 
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info. More...
 
 setSubtitle ($a_subtitle)
 Set Subtitle. More...
 
 getSubtitle ()
 Get Subtitle. More...
 
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true). More...
 
 setAdminCommands ($a_admincommands)
 Set Administration Commmands. More...
 
 getAdminCommands ()
 Get Administration Commmands. More...
 
 setColSpan ($a_colspan)
 Set Columns Span. More...
 
 getColSpan ()
 Get Columns Span. More...
 
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow. More...
 
 getEnableDetailRow ()
 Get EnableDetailRow. More...
 
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info. More...
 
 getEnableNumInfo ()
 Get Enable Item Number Info. More...
 
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty ($a_property)
 
 setProperty ($a_property, $a_value)
 
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getDetailParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 Get Row Template Name. More...
 
 getRowTemplateDir ()
 Get Row Template Directory. More...
 
 addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false)
 Add Block Command. More...
 
 getBlockCommands ()
 Get Block commands. More...
 
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command. More...
 
 getHeaderCommands ()
 Get Header Block commands. More...
 
 addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
 Add a footer text/link. More...
 
 getFooterLinks ()
 Get footer links. More...
 
 clearFooterLinks ()
 Clear footer links. More...
 
 handleDetailLevel ()
 Handle read/write current detail level. More...
 
 getHTML ()
 Handle config status. More...
 
 fillHeaderCommands ()
 Fill header commands block. More...
 
 fillHeaderTitleBlock ()
 Fill header title block (title and. More...
 
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used. More...
 
 fillDataSection ()
 Standard implementation for row based data. More...
 
 fillRow ($a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 Fill previous/next row. More...
 
 setPreviousNextLinks ()
 Get previous/next linkbar. More...
 
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links. More...
 
 fillDetailRow ()
 Fill Detail Setting Row. More...
 

Static Public Member Functions

static getBlockType ()
 Get block type. More...
 
static isRepositoryObject ()
 Is this a repository object. More...
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 
- Static Public Member Functions inherited from ilBlockGUI
static getBlockType ()
 
static isRepositoryObject ()
 
static getScreenMode ()
 Get Screen Mode for current command. More...
 

Data Fields

 $ctrl = null
 

Static Public Attributes

static $block_type = "cal"
 
static $st_data
 

Protected Member Functions

 initCategories ()
 init categories More...
 
 setSubTabs ()
 
- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 

Protected Attributes

 $mode
 
 $display_mode
 
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 
 $colspan = 1
 
 $enablenuminfo = true
 
 $detail_min = 0
 
 $detail_max = 0
 
 $bigmode = false
 
 $footer_links = array()
 
 $block_id = 0
 
 $header_commands = array()
 
 $allow_moving = true
 
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
 $enabledetailrow = true
 
 $header_links = array()
 
 $footerinfo = false
 
 $footerinfo_icon = false
 
 $block_commands = array()
 
 $max_count = false
 
 $close_command = false
 
 $image = false
 
 $property = false
 
 $nav_value = ""
 
 $css_row = ""
 
 $dropdown
 

Detailed Description

Member Function Documentation

◆ addCloseCommand()

ilCalendarBlockGUI::addCloseCommand (   $a_content_block)

Definition at line 593 of file class.ilCalendarBlockGUI.php.

References $ilCtrl, and $lng.

594  {
595  global $lng, $ilCtrl;
596 
597  $a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
598  $lng->txt("close"), true);
599  }
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40

◆ addMiniMonth()

ilCalendarBlockGUI::addMiniMonth (   $a_tpl)

Add mini version of monthly overview (Maybe extracted to another class, if used in pd calendar tab.

Definition at line 299 of file class.ilCalendarBlockGUI.php.

References $_GET, $ilCtrl, $ilUser, $lng, ilDateTime\_before(), ilCalendarUtil\_buildMonthDayList(), ilDateTime\_equals(), ilCalendarUtil\_isToday(), ilCalendarUtil\_numericDayToString(), ilBlockGUI\getBlockId(), getBlockType(), IL_CAL_DATE, IL_CAL_FKT_DATE, IL_CAL_MONTH, ilDateTime\MONTH, and ilCalendarSchedule\TYPE_MONTH.

Referenced by fillDataSection().

300  {
301  global $ilCtrl, $lng,$ilUser;
302 
303  // weekdays
304  include_once('Services/Calendar/classes/class.ilCalendarUtil.php');
305  $a_tpl->setCurrentBlock('month_header_col');
306  $a_tpl->setVariable('TXT_WEEKDAY', $lng->txt("cal_week_abbrev"));
307  $a_tpl->parseCurrentBlock();
308  for($i = (int) $this->user_settings->getWeekStart();$i < (7 + (int) $this->user_settings->getWeekStart());$i++)
309  {
310  $a_tpl->setCurrentBlock('month_header_col');
311  $a_tpl->setVariable('TXT_WEEKDAY',ilCalendarUtil::_numericDayToString($i,false));
312  $a_tpl->parseCurrentBlock();
313  }
314 
315  if(isset($_GET["bkid"]))
316  {
317  $user_id = $_GET["bkid"];
318  $disable_empty = true;
319  }
320  else
321  {
322  $user_id = $ilUser->getId();
323  $disable_empty = false;
324  }
325  include_once('Services/Calendar/classes/class.ilCalendarSchedule.php');
326  $this->scheduler = new ilCalendarSchedule($this->seed,ilCalendarSchedule::TYPE_MONTH,$user_id);
327  $this->scheduler->addSubitemCalendars(true);
328  $this->scheduler->calculate();
329 
330  $counter = 0;
331  foreach(ilCalendarUtil::_buildMonthDayList($this->seed->get(IL_CAL_FKT_DATE,'m'),
332  $this->seed->get(IL_CAL_FKT_DATE,'Y'),
333  $this->user_settings->getWeekStart())->get() as $date)
334  {
335  $counter++;
336 
337  $events = $this->scheduler->getByDay($date,$ilUser->getTimeZone());
338  $has_events = (bool)count($events);
339  if($has_events || !$disable_empty)
340  {
341  $a_tpl->setCurrentBlock('month_col_link');
342  }
343  else
344  {
345  $a_tpl->setCurrentBlock('month_col_no_link');
346  }
347 
348  if($disable_empty)
349  {
350  if(!$has_events)
351  {
352  $a_tpl->setVariable('DAY_CLASS','calminiinactive');
353  }
354  else
355  {
356  $week_has_events = true;
357  include_once 'Services/Booking/classes/class.ilBookingEntry.php';
358  foreach($events as $event)
359  {
360  $booking = new ilBookingEntry($event['event']->getContextId());
361  if($booking->hasBooked($event['event']->getEntryId()))
362  {
363  $a_tpl->setVariable('DAY_CLASS','calminiapp');
364  break;
365  }
366  }
367  }
368  }
369  elseif($has_events)
370  {
371  $week_has_events = true;
372  $a_tpl->setVariable('DAY_CLASS','calminiapp');
373  }
374 
375 
376  $day = $date->get(IL_CAL_FKT_DATE,'j');
377  $month = $date->get(IL_CAL_FKT_DATE,'n');
378 
379  $month_day = $day;
380 
381  $ilCtrl->clearParametersByClass('ilcalendardaygui');
382  $ilCtrl->setParameterByClass('ilcalendardaygui','seed',$date->get(IL_CAL_DATE));
383  $a_tpl->setVariable('OPEN_DAY_VIEW', $ilCtrl->getLinkTargetByClass('ilcalendardaygui',''));
384  $ilCtrl->clearParametersByClass('ilcalendardaygui');
385 
386  $a_tpl->setVariable('MONTH_DAY',$month_day);
387 
388  $a_tpl->parseCurrentBlock();
389 
390 
391  $a_tpl->setCurrentBlock('month_col');
392 
393  include_once('./Services/Calendar/classes/class.ilCalendarUtil.php');
394  if(ilCalendarUtil::_isToday($date))
395  {
396  $a_tpl->setVariable('TD_CLASS','calminitoday');
397  }
398  #elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_DAY))
399  #{
400  # $a_tpl->setVariable('TD_CLASS','calmininow');
401  #}
402  elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_MONTH))
403  {
404  $a_tpl->setVariable('TD_CLASS','calministd');
405  }
406  elseif(ilDateTime::_before($date,$this->seed,IL_CAL_MONTH))
407  {
408  $a_tpl->setVariable('TD_CLASS','calminiprev');
409  }
410  else
411  {
412  $a_tpl->setVariable('TD_CLASS','calmininext');
413  }
414 
415  $a_tpl->parseCurrentBlock();
416 
417 
418  if($counter and !($counter % 7))
419  {
420  if(!$disable_empty || $week_has_events)
421  {
422  $a_tpl->setCurrentBlock('month_row_link');
423  $ilCtrl->clearParametersByClass('ilcalendarweekgui');
424  $ilCtrl->setParameterByClass('ilcalendarweekgui','seed',$date->get(IL_CAL_DATE));
425  $a_tpl->setVariable('OPEN_WEEK_VIEW', $ilCtrl->getLinkTargetByClass('ilcalendarweekgui',''));
426  $ilCtrl->clearParametersByClass('ilcalendarweekgui');
427  }
428  else
429  {
430  $a_tpl->setCurrentBlock('month_row_no_link');
431  $a_tpl->setVariable('WEEK_CLASS', 'calminiinactive');
432  }
433  $a_tpl->setVariable('WEEK',
434  $date->get(IL_CAL_FKT_DATE,'W'));
435  $a_tpl->parseCurrentBlock();
436 
437  $a_tpl->setCurrentBlock('month_row');
438  $a_tpl->setVariable('TD_CLASS','calminiweek');
439  $a_tpl->parseCurrentBlock();
440 
441  $week_has_events = false;
442  }
443  }
444  $a_tpl->setCurrentBlock('mini_month');
445  $a_tpl->setVariable('TXT_MONTH_OVERVIEW', $lng->txt("cal_month_overview"));
446  $a_tpl->setVariable('TXT_MONTH',
447  $lng->txt('month_'.$this->seed->get(IL_CAL_FKT_DATE,'m').'_long').
448  ' '.$this->seed->get(IL_CAL_FKT_DATE,'Y'));
449  $myseed = clone($this->seed);
450  $ilCtrl->setParameterByClass('ilcalendarmonthgui','seed',$myseed->get(IL_CAL_DATE));
451  $a_tpl->setVariable('OPEN_MONTH_VIEW',$ilCtrl->getLinkTargetByClass('ilcalendarmonthgui',''));
452 
453  $myseed->increment(ilDateTime::MONTH, -1);
454  $ilCtrl->setParameter($this,'seed',$myseed->get(IL_CAL_DATE));
455 
456  $a_tpl->setVariable('BL_TYPE', $this->getBlockType());
457  $a_tpl->setVariable('BL_ID', $this->getBlockId());
458 
459  $a_tpl->setVariable('PREV_MONTH',
460  $ilCtrl->getLinkTarget($this, "setSeed"));
461  $a_tpl->setVariable('PREV_MONTH_ASYNC',
462  $ilCtrl->getLinkTarget($this, "setSeed", "", true));
463 
464  $myseed->increment(ilDateTime::MONTH, 2);
465  $ilCtrl->setParameter($this,'seed',$myseed->get(IL_CAL_DATE));
466  $a_tpl->setVariable('NEXT_MONTH',
467  $ilCtrl->getLinkTarget($this, "setSeed"));
468  $a_tpl->setVariable('NEXT_MONTH_ASYNC',
469  $ilCtrl->getLinkTarget($this, "setSeed", "", true));
470 
471  $ilCtrl->setParameter($this, 'seed', "");
472  $a_tpl->parseCurrentBlock();
473  }
static _buildMonthDayList($a_month, $a_year, $weekstart)
Build a month day list.
static _numericDayToString($a_day, $a_long=true)
get
$_GET["client_id"]
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
Booking definition.
static getBlockType()
Get block type.
const IL_CAL_MONTH
global $ilCtrl
Definition: ilias.php:18
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
const IL_CAL_FKT_DATE
getBlockId()
Get Block Id.
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
static _isToday($date)
check if a date is today
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilCalendarBlockGUI::executeCommand ( )

execute command

Definition at line 189 of file class.ilCalendarBlockGUI.php.

References $cmd, $ilCtrl, $ilUser, and setSubTabs().

190  {
191  global $ilCtrl,$ilTabs,$ilUser;
192 
193  $next_class = $ilCtrl->getNextClass();
194  $cmd = $ilCtrl->getCmd("getHTML");
195 
196  $this->setSubTabs();
197 
198  switch ($next_class)
199  {
200  case "ilcalendarappointmentgui":
201  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
202  $app_gui = new ilCalendarAppointmentGUI($this->seed,$this->seed);
203  $ilCtrl->forwardCommand($app_gui);
204  break;
205 
206  case "ilcalendardaygui":
207  $ilTabs->setSubTabActive('app_day');
208  include_once('./Services/Calendar/classes/class.ilCalendarDayGUI.php');
209  $day_gui = new ilCalendarDayGUI($this->seed);
210  $ilCtrl->forwardCommand($day_gui);
211  break;
212 
213  case "ilcalendarweekgui":
214  $ilTabs->setSubTabActive('app_week');
215  include_once('./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
216  $week_gui = new ilCalendarWeekGUI($this->seed);
217  $ilCtrl->forwardCommand($week_gui);
218  break;
219 
220  case "ilcalendarmonthgui":
221  $ilTabs->setSubTabActive('app_month');
222  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
223  $month_gui = new ilCalendarMonthGUI($this->seed);
224  $ilCtrl->forwardCommand($month_gui);
225  break;
226 
227  case "ilcalendarinboxgui":
228  include_once('./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
229  $inbox = new ilCalendarInboxGUI($this->seed);
230  $ilCtrl->forwardCommand($inbox);
231  break;
232 
233  case "ilconsultationhoursgui":
234  include_once('./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursGUI.php');
235  $hours = new ilConsultationHoursGUI($this->seed);
236  $ilCtrl->forwardCommand($hours);
237  break;
238 
239  default:
240  return $this->$cmd();
241  }
242  }
Consultation hours editor.
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
Administrate calendar appointments.
Presentation day view.
+ Here is the call graph for this function:

◆ fillDataSection()

ilCalendarBlockGUI::fillDataSection ( )

Fill data section.

Definition at line 267 of file class.ilCalendarBlockGUI.php.

References $tpl, addMiniMonth(), ilBlockGUI\fillDataSection(), ilBlockGUI\getCurrentDetailLevel(), getOverview(), ilBlockGUI\setColSpan(), and ilBlockGUI\setDataSection().

268  {
269  // alex: changed from > 1 to > 0 - original detail level 1 did not work anymore
270  if ($this->getCurrentDetailLevel() > 0 && $this->display_mode != "mmon")
271  {
272  $this->setColSpan(1);
273  $this->tpl->addBlockFile("BLOCK_ROW", "block_row","tpl.pd_event_list.html", "Services/Calendar");
274 
276  }
277  else
278  {
279  // alex: changed from > 1 to > 0 - original detail level 1 did not work anymore
280  if ($this->getCurrentDetailLevel() > 0)
281  {
282  $tpl = new ilTemplate("tpl.calendar_block.html", true, true,
283  "Services/Calendar");
284 
285  $this->addMiniMonth($tpl);
286  $this->setDataSection($tpl->get());
287  }
288  else
289  {
290  $this->setDataSection($this->getOverview());
291  }
292  }
293  }
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setColSpan($a_colspan)
Set Columns Span.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
addMiniMonth($a_tpl)
Add mini version of monthly overview (Maybe extracted to another class, if used in pd calendar tab...
fillDataSection()
Standard implementation for row based data.
getCurrentDetailLevel()
Get Current Detail Level.
+ Here is the call graph for this function:

◆ fillFooter()

ilCalendarBlockGUI::fillFooter ( )

Definition at line 735 of file class.ilCalendarBlockGUI.php.

References $ilCtrl, $ilUser, $lng, ilBlockGUI\fillFooterLinks(), ilBlockGUI\getColSpan(), and setFooterLinks().

736  {
737  global $ilCtrl, $lng, $ilUser;
738 
739  // begin-patch ch
740  foreach((array) $this->cal_footer as $link_info)
741  {
742  $this->tpl->setCurrentBlock('data_section');
743  $this->tpl->setVariable('DATA',
744  sprintf('<a href="%s">%s</a>',$link_info['link'],$link_info['txt'])
745 
746  );
747  $this->tpl->parseCurrentBlock();
748  }
749  // end-patch ch
750 
751  $this->setFooterLinks();
752  $this->fillFooterLinks();
753  $this->tpl->setVariable("FCOLSPAN", $this->getColSpan());
754  if ($this->tpl->blockExists("block_footer"))
755  {
756  $this->tpl->setCurrentBlock("block_footer");
757  $this->tpl->parseCurrentBlock();
758  }
759 
760  }
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
getColSpan()
Get Columns Span.
+ Here is the call graph for this function:

◆ getBlockType()

static ilCalendarBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Definition at line 139 of file class.ilCalendarBlockGUI.php.

Referenced by addMiniMonth(), and ilCalendarBlockGUI().

140  {
141  return self::$block_type;
142  }
+ Here is the caller graph for this function:

◆ getData()

ilCalendarBlockGUI::getData ( )

Definition at line 829 of file class.ilCalendarBlockGUI.php.

References ilBlockGUI\$data, $ilCtrl, $lng, ilDatePresentation\formatPeriod(), IL_CAL_DATE, IL_CAL_UNIX, ilBlockGUI\setEnableNumInfo(), and ilCalendarSchedule\TYPE_PD_UPCOMING.

830  {
831  global $ilCtrl, $lng;
832 
833  $seed = new ilDate(date('Y-m-d',time()),IL_CAL_DATE);
834 
835  include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
837  $schedule->addSubitemCalendars(true); // #12007
838  $schedule->setEventsLimit(20);
839  $schedule->calculate();
840  $events = $schedule->getScheduledEvents(); // #13809
841 
842  $data = array();
843  if(sizeof($events))
844  {
845  foreach($events as $item)
846  {
847  $start = $item["dstart"];
848  $end = $item["dend"];
849  if($item["fullday"])
850  {
851  $start = new ilDate($start, IL_CAL_UNIX);
852  $end = new ilDate($end, IL_CAL_UNIX);
853  }
854  else
855  {
856  $start = new ilDateTime($start, IL_CAL_UNIX);
857  $end = new ilDateTime($end, IL_CAL_UNIX);
858  }
859 
860  $ilCtrl->clearParametersByClass('ilcalendardaygui');
861  $ilCtrl->setParameterByClass('ilcalendardaygui','seed', $start->get(IL_CAL_DATE));
862  $link = $ilCtrl->getLinkTargetByClass('ilcalendardaygui','');
863  $ilCtrl->clearParametersByClass('ilcalendardaygui');
864 
865  $data[] = array(
866  "date" => ilDatePresentation::formatPeriod($start, $end),
867  "title" => $item["event"]->getPresentationTitle(),
868  "url" => $link
869  );
870  }
871 
872  $this->setEnableNumInfo(true);
873  }
874  else
875  {
876  $data[] = array(
877  "date" => $lng->txt("msg_no_search_result"),
878  "title" => "",
879  "url" => ""
880  );
881 
882  $this->setEnableNumInfo(false);
883  }
884 
885  return $data;
886  }
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
const IL_CAL_UNIX
global $ilCtrl
Definition: ilias.php:18
Class for single dates.
Date and time handling
const IL_CAL_DATE
global $lng
Definition: privfeed.php:40
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
+ Here is the call graph for this function:

◆ getEnableEdit()

ilCalendarBlockGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean Edit mode on/off

Definition at line 259 of file class.ilCalendarBlockGUI.php.

260  {
261  return $this->enable_edit;
262  }

◆ getHTML()

ilCalendarBlockGUI::getHTML ( )

Get bloch HTML code.

Definition at line 478 of file class.ilCalendarBlockGUI.php.

References $_GET, $ilCtrl, $ilUser, $lng, $ret, ilCourseParticipants\_getInstanceByObjId(), ilObjUser\_lookupFullname(), ilBlockGUI\addBlockCommand(), ilBlockGUI\getCurrentDetailLevel(), ilUtil\getImagePath(), ilBlockGUI\getProperty(), ilBookingEntry\lookupBookableUsersForObject(), ilCalendarCategories\MODE_PERSONAL_DESKTOP_ITEMS, ilCalendarCategories\MODE_PERSONAL_DESKTOP_MEMBERSHIP, and ilCalendarCategories\MODE_REPOSITORY.

Referenced by setPdModeEvents(), setPdModeMonth(), and setSeed().

479  {
480  global $ilCtrl, $lng, $ilUser,$ilAccess;
481 
482  if ($this->getCurrentDetailLevel() == 0)
483  {
484  return "";
485  }
486 
487  // add edit commands
488  #if ($this->getEnableEdit())
489 
492  {
493  $this->addBlockCommand(
494  $this->ctrl->getLinkTarget($this,'showCalendarSubscription'),
495  $lng->txt('ical_export'),
496  '',
497  ilUtil::getImagePath('ical.png'),
498  true
499  );
500  }
501 
502 
503  if($this->mode == ilCalendarCategories::MODE_REPOSITORY)
504  {
505  if(!isset($_GET["bkid"]))
506  {
507  if($ilAccess->checkAccess('edit_event','',(int) $_GET['ref_id']))
508  {
509  $ilCtrl->setParameter($this, "add_mode", "block");
510  $this->addBlockCommand(
511  $ilCtrl->getLinkTargetByClass("ilCalendarAppointmentGUI",
512  "add"),
513  $lng->txt("add_appointment"));
514  $ilCtrl->setParameter($this, "add_mode", "");
515  }
516 
517  global $ilObjDataCache;
518 
519  include_once "Modules/Course/classes/class.ilCourseParticipants.php";
520  $obj_id = $ilObjDataCache->lookupObjId((int) $_GET['ref_id']);
521  $participants = ilCourseParticipants::_getInstanceByObjId($obj_id);
522  $users = array_unique(array_merge($participants->getTutors(), $participants->getAdmins()));
523  //$users = $participants->getParticipants();
524  include_once 'Services/Booking/classes/class.ilBookingEntry.php';
525  //$users = ilBookingEntry::isBookable($users, $obj_id);
526  $users = ilBookingEntry::lookupBookableUsersForObject($obj_id,$users);
527  if($users)
528  {
529  foreach($users as $user_id)
530  {
531  if(!isset($_GET["bkid"]))
532  {
533  $ilCtrl->setParameter($this, "bkid", $user_id);
534  $this->addBlockCommand(
535  $ilCtrl->getLinkTargetByClass("ilCalendarMonthGUI",
536  ""),
537  $lng->txt("cal_consultation_hours_for").' '.ilObjUser::_lookupFullname($user_id));
538 
539  $this->cal_footer[] = array(
540  'link' => $ilCtrl->getLinkTargetByClass('ilCalendarMonthGUI',''),
541  'txt' => $lng->txt("cal_consultation_hours_for").' '.ilObjUser::_lookupFullname($user_id)
542  );
543 
544  }
545  }
546  $ilCtrl->setParameter($this, "bkid", "");
547  }
548  }
549  else
550  {
551  $ilCtrl->setParameter($this, "bkid", "");
552  $this->addBlockCommand(
553  $ilCtrl->getLinkTarget($this),
554  $lng->txt("back"));
555  $ilCtrl->setParameter($this, "bkid", (int)$_GET["bkid"]);
556  }
557  }
558 
559  if ($this->getProperty("settings") == true)
560  {
561  $this->addBlockCommand(
562  $ilCtrl->getLinkTarget($this, "editSettings"),
563  $lng->txt("settings"));
564  }
565 
566  $ilCtrl->setParameterByClass("ilcolumngui", "seed", isset($_GET["seed"]) ? $_GET["seed"] : "");
567  $ret = parent::getHTML();
568  $ilCtrl->setParameterByClass("ilcolumngui", "seed", "");
569 
570  return $ret;
571  }
addBlockCommand($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false)
Add Block Command.
$_GET["client_id"]
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
_lookupFullname($a_user_id)
Lookup Full Name.
global $ilCtrl
Definition: ilias.php:18
static lookupBookableUsersForObject($a_obj_id, $a_user_ids)
Consultation hours are offered if 1) consultation hour owner is admin or tutor and no object assignme...
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
getProperty($a_property)
getCurrentDetailLevel()
Get Current Detail Level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverview()

ilCalendarBlockGUI::getOverview ( )

Get overview.

Definition at line 576 of file class.ilCalendarBlockGUI.php.

References $ilCtrl, $ilUser, $lng, and ilCalendarSchedule\TYPE_INBOX.

Referenced by fillDataSection().

577  {
578  global $ilUser, $lng, $ilCtrl;
579 
580  include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
581  $schedule = new ilCalendarSchedule($this->seed,ilCalendarSchedule::TYPE_INBOX);
582  $events = $schedule->getChangedEvents(true);
583 
584  $ilCtrl->setParameterByClass('ilcalendarinboxgui', 'changed', 1);
585  $link = '<a href='.$ilCtrl->getLinkTargetByClass('ilcalendarinboxgui','').'>';
586  $ilCtrl->setParameterByClass('ilcalendarinboxgui', 'changed', '');
587  $text = '<div class="small">'.((int) count($events))." ".$lng->txt("cal_changed_events_header")."</div>";
588  $end_link = '</a>';
589 
590  return $link.$text.$end_link;
591  }
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
+ Here is the caller graph for this function:

◆ getScreenMode()

static ilCalendarBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Definition at line 157 of file class.ilCalendarBlockGUI.php.

References $_GET, $ilCtrl, and IL_SCREEN_CENTER.

158  {
159  global $ilCtrl;
160 
161  $cmd_class = $ilCtrl->getCmdClass();
162 
163  if ($cmd_class == "ilcalendarappointmentgui" ||
164  $cmd_class == "ilcalendardaygui" ||
165  $cmd_class == "ilcalendarweekgui" ||
166  $cmd_class == "ilcalendarmonthgui" ||
167  $cmd_class == "ilcalendarinboxgui" ||
168  $cmd_class == "ilconsultationhoursgui" ||
169  $_GET['cmd'] == 'showCalendarSubscription')
170  {
171  return IL_SCREEN_CENTER;
172  }
173 
174  switch($ilCtrl->getCmd())
175  {
176  case "kkk":
177  // return IL_SCREEN_CENTER;
178  // return IL_SCREEN_FULL;
179 
180  default:
181  //return IL_SCREEN_SIDE;
182  break;
183  }
184  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
const IL_SCREEN_CENTER

◆ ilCalendarBlockGUI()

ilCalendarBlockGUI::ilCalendarBlockGUI (   $a_skip_init = false)

Constructor.

Parameters
booleanskip initialisation (is called by derived PDCalendarBlockGUI class)

Definition at line 54 of file class.ilCalendarBlockGUI.php.

References $_GET, $_SESSION, $ilCtrl, $ilUser, $lng, $mode, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ilObjUser\_lookupFullname(), ilBlockGUI\getBlockId(), getBlockType(), ilUtil\getImagePath(), IL_CAL_DATE, IL_CAL_UNIX, initCategories(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setImage(), ilBlockGUI\setLimit(), and ilBlockGUI\setTitle().

55  {
56  global $ilCtrl, $lng, $ilUser, $tpl, $ilHelp;
57 
58  parent::ilBlockGUI();
59 
60  $this->ctrl = $ilCtrl;
61  $this->setImage(ilUtil::getImagePath("icon_cals_s.png"));
62 
63  $lng->loadLanguageModule("dateplaner");
64  $ilHelp->addHelpSection("cal_block");
65 
66  include_once("./Services/News/classes/class.ilNewsItem.php");
67 
68  $ilCtrl->saveParameter($this, 'bkid');
69 
70  if (!$a_skip_init)
71  {
72  $this->initCategories();
73  $this->setBlockId($ilCtrl->getContextObjId());
74  }
75 
76  $this->setLimit(5); // @todo: needed?
77 
78  // alex: original detail level 1 did not work anymore
79  $this->setAvailableDetailLevels(1);
80  $this->setEnableNumInfo(false);
81 
82  if(!isset($_GET["bkid"]))
83  {
84  $title = $lng->txt("calendar");
85  }
86  else
87  {
88  $title = $lng->txt("cal_consultation_hours_for")." ".ilObjUser::_lookupFullname($_GET["bkid"]);
89  }
90 
91  $this->setTitle($title);
92  //$this->setData($data);
93  $this->allow_moving = false;
94  //$this->handleView();
95 
96  include_once('Services/Calendar/classes/class.ilDate.php');
97  include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
98 
99  $seed_str = "";
100  if ((!isset($_GET["seed"]) || $_GET["seed"] == "") &&
101  isset($_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"]))
102  {
103  $seed_str = $_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"];
104  }
105  else if (isset($_GET["seed"]))
106  {
107  $seed_str = $_GET["seed"];
108  }
109 
110  if (isset($_GET["seed"]) && $_GET["seed"] != "")
111  {
112  $_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"]
113  = $_GET["seed"];
114  }
115 
116  if ($seed_str == "")
117  {
118  $this->seed = new ilDate(time(),IL_CAL_UNIX); // @todo: check this
119  }
120  else
121  {
122  $this->seed = new ilDate($seed_str,IL_CAL_DATE); // @todo: check this
123  }
124  $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
125 
126  $tpl->addCSS("./Services/Calendar/css/calendar.css");
127  // @todo: this must work differently...
128  $tpl->addCSS("./Services/Calendar/templates/default/delos.css");
129 
130  $mode = $ilUser->getPref("il_pd_cal_mode");
131  $this->display_mode = $mode ? $mode : "mmon";
132  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
static _getInstanceByUserId($a_user_id)
get singleton instance
static getBlockType()
Get block type.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
const IL_CAL_UNIX
_lookupFullname($a_user_id)
Lookup Full Name.
global $ilCtrl
Definition: ilias.php:18
initCategories()
init categories
setImage($a_image)
Set Image.
Class for single dates.
setTitle($a_title)
Set Title.
setBlockId($a_block_id=0)
Set Block Id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
getBlockId()
Get Block Id.
setLimit($a_limit)
Set Limit.
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ initCategories()

ilCalendarBlockGUI::initCategories ( )
protected

init categories

protected

Parameters

Definition at line 608 of file class.ilCalendarBlockGUI.php.

References $_GET, ilCalendarCategories\_getInstance(), ilCalendarCategories\MODE_CONSULTATION, and ilCalendarCategories\MODE_REPOSITORY.

Referenced by ilCalendarBlockGUI().

609  {
611 
612  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
613 
614  if(!isset($_GET['bkid']))
615  {
617  }
618  else
619  {
620  // display consultation hours only (in course/group)
621  ilCalendarCategories::_getInstance()->setCHUserId((int) $_GET['bkid']);
622  ilCalendarCategories::_getInstance()->initialize(ilCalendarCategories::MODE_CONSULTATION,(int) $_GET['ref_id'],true);
623  }
624  }
$_GET["client_id"]
static _getInstance($a_usr_id=0)
get singleton instance
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

static ilCalendarBlockGUI::isRepositoryObject ( )
static

Is this a repository object.

Returns
string Block type.

Definition at line 149 of file class.ilCalendarBlockGUI.php.

150  {
151  return false;
152  }

◆ returnToUpperContext()

ilCalendarBlockGUI::returnToUpperContext ( )

Return to upper context.

Definition at line 673 of file class.ilCalendarBlockGUI.php.

References $ilCtrl.

Referenced by setSeed().

674  {
675  global $ilCtrl;
676 
677  $ilCtrl->returnToParent($this);
678  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setEnableEdit()

ilCalendarBlockGUI::setEnableEdit (   $a_enable_edit = 0)

Set EnableEdit.

Parameters
boolean$a_enable_editEdit mode on/off

Definition at line 249 of file class.ilCalendarBlockGUI.php.

250  {
251  $this->enable_edit = $a_enable_edit;
252  }

◆ setFooterLinks()

ilCalendarBlockGUI::setFooterLinks ( )

Definition at line 762 of file class.ilCalendarBlockGUI.php.

References ilBlockGUI\$block_id, $ilCtrl, $lng, ilBlockGUI\addFooterLink(), and ilBlockGUI\getCurrentDetailLevel().

Referenced by fillFooter().

763  {
764  global $ilCtrl, $lng;
765 
766  // alex: changed from < 2 to < 1 - original detail level 1 did not work anymore
767  if ($this->getCurrentDetailLevel() < 1)
768  {
769  return;
770  }
771 
772 // if ($this->display_mode == 'mmon')
773 // {
774 // $this->addFooterLink($lng->txt("month"));
775 
776  $this->addFooterLink($lng->txt("cal_upcoming_events_header"),
777  $ilCtrl->getLinkTarget($this, "setPdModeEvents"),
778  $ilCtrl->getLinkTarget($this, "setPdModeEvents", "", true),
779  "block_".$this->getBlockType()."_".$this->block_id,
780  false, false, ($this->display_mode != 'mmon'));
781 
782 // }
783 // else
784 // {
785  $this->addFooterLink( $lng->txt("app_month"),
786  $ilCtrl->getLinkTarget($this, "setPdModeMonth"),
787  $ilCtrl->getLinkTarget($this, "setPdModeMonth", "", true),
788  "block_".$this->getBlockType()."_".$this->block_id,
789  false, false, ($this->display_mode == 'mmon'));
790 
791 // $this->addFooterLink($lng->txt("cal_upcoming_events_header"));
792 // }
793  }
addFooterLink($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
Add a footer text/link.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
getCurrentDetailLevel()
Get Current Detail Level.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPdModeEvents()

ilCalendarBlockGUI::setPdModeEvents ( )

Definition at line 795 of file class.ilCalendarBlockGUI.php.

References $ilCtrl, $ilUser, exit, and getHTML().

796  {
797  global $ilUser, $ilCtrl;
798 
799  $ilUser->writePref("il_pd_cal_mode", "evt");
800  $this->display_mode = "evt";
801  if ($ilCtrl->isAsynch())
802  {
803  echo $this->getHTML();
804  exit;
805  }
806  else
807  {
808  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
809  }
810  }
exit
Definition: login.php:54
getHTML()
Get bloch HTML code.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ setPdModeMonth()

ilCalendarBlockGUI::setPdModeMonth ( )

Definition at line 812 of file class.ilCalendarBlockGUI.php.

References $ilCtrl, $ilUser, exit, and getHTML().

813  {
814  global $ilUser, $ilCtrl;
815 
816  $ilUser->writePref("il_pd_cal_mode", "mmon");
817  $this->display_mode = "mmon";
818  if ($ilCtrl->isAsynch())
819  {
820  echo $this->getHTML();
821  exit;
822  }
823  else
824  {
825  $ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
826  }
827  }
exit
Definition: login.php:54
getHTML()
Get bloch HTML code.
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ setSeed()

ilCalendarBlockGUI::setSeed ( )

Set seed.

Definition at line 652 of file class.ilCalendarBlockGUI.php.

References $_GET, $_SESSION, $ilCtrl, $ilUser, exit, ilBlockGUI\getBlockId(), getHTML(), and returnToUpperContext().

653  {
654  global $ilCtrl, $ilUser;
655 
656  //$ilUser->writePref("il_pd_bkm_mode", 'flat');
657  $_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"] =
658  $_GET["seed"];
659  if ($ilCtrl->isAsynch())
660  {
661  echo $this->getHTML();
662  exit;
663  }
664  else
665  {
666  $this->returnToUpperContext();
667  }
668  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
exit
Definition: login.php:54
$_GET["client_id"]
getHTML()
Get bloch HTML code.
global $ilCtrl
Definition: ilias.php:18
returnToUpperContext()
Return to upper context.
getBlockId()
Get Block Id.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ setSubTabs()

ilCalendarBlockGUI::setSubTabs ( )
protected
Parameters

Definition at line 631 of file class.ilCalendarBlockGUI.php.

References $_GET.

Referenced by executeCommand().

632  {
633  global $ilTabs;
634 
635  $ilTabs->clearSubTabs();
636  return true;
637 
638  // TODO: needs another switch
639  if($_GET['ref_id'])
640  {
641 
642  $ilTabs->addSubTabTarget('app_day',$this->ctrl->getLinkTargetByClass('ilCalendarDayGUI',''));
643  $ilTabs->addSubTabTarget('app_week',$this->ctrl->getLinkTargetByClass('ilCalendarWeekGUI',''));
644  $ilTabs->addSubTabTarget('app_month',$this->ctrl->getLinkTargetByClass('ilCalendarMonthGUI',''));
645  }
646  return true;
647  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ showCalendarSubscription()

ilCalendarBlockGUI::showCalendarSubscription ( )

Definition at line 681 of file class.ilCalendarBlockGUI.php.

References $_GET, $ilUser, $lng, $tpl, ilObject\_lookupObjId(), ilCalendarAuthenticationToken\lookupAuthToken(), ilCalendarCategories\MODE_PERSONAL_DESKTOP_ITEMS, ilCalendarCategories\MODE_PERSONAL_DESKTOP_MEMBERSHIP, ilCalendarAuthenticationToken\SELECTION_CATEGORY, ilCalendarAuthenticationToken\SELECTION_PD, and ilCalendarAuthenticationToken\setSelectionType().

682  {
683  global $lng, $ilUser;
684 
685  $tpl = new ilTemplate('tpl.show_calendar_subscription.html',true,true,'Services/Calendar');
686 
687  $tpl->setVariable('TXT_TITLE',$lng->txt('cal_subscription_header'));
688  $tpl->setVariable('TXT_INFO',$lng->txt('cal_subscription_info'));
689  $tpl->setVariable('TXT_CAL_URL',$lng->txt('cal_subscription_url'));
690 
691  include_once './Services/Calendar/classes/class.ilCalendarAuthenticationToken.php';
692 
693  switch($this->mode)
694  {
698  $calendar = 0;
699  break;
700 
701  default:
703  // TODO: calendar id
704  $calendar = ilObject::_lookupObjId((int) $_GET['ref_id']);
705  break;
706  }
707  if($hash = ilCalendarAuthenticationToken::lookupAuthToken($ilUser->getId(), $selection, $calendar))
708  {
709 
710  }
711  else
712  {
713  $token = new ilCalendarAuthenticationToken($ilUser->getId());
714  $token->setSelectionType($selection);
715  $token->setCalendar($calendar);
716  $hash = $token->add();
717  }
718  $url = ILIAS_HTTP_PATH.'/calendar.php?client_id='.CLIENT_ID.'&token='.$hash;
719 
720  $tpl->setVariable('VAL_CAL_URL',$url);
721  $tpl->setVariable('VAL_CAL_URL_TXT',$url);
722 
723  include_once("./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
724  $content_block = new ilPDContentBlockGUI();
725  $content_block->setContent($tpl->get());
726  $content_block->setTitle($lng->txt("calendar"));
727  #$content_block->setImage(ilUtil::getImagePath("icon_news.png"));
728  $content_block->addHeaderCommand($this->ctrl->getParentReturn($this),
729  $lng->txt("selected_items_back"));
730 
731  return $content_block->getHTML();
732 
733  }
$_GET["client_id"]
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
static lookupAuthToken($a_user_id, $a_selection, $a_calendar=0)
Handles calendar authentication tokens for external calendar subscriptions.
BlockGUI class for (centered) Content on Personal Desktop.
+ Here is the call graph for this function:

Field Documentation

◆ $block_type

ilCalendarBlockGUI::$block_type = "cal"
static

Definition at line 46 of file class.ilCalendarBlockGUI.php.

◆ $ctrl

ilCalendarBlockGUI::$ctrl = null

Definition at line 42 of file class.ilCalendarBlockGUI.php.

◆ $display_mode

ilCalendarBlockGUI::$display_mode
protected

Definition at line 44 of file class.ilCalendarBlockGUI.php.

◆ $mode

ilCalendarBlockGUI::$mode
protected

Definition at line 43 of file class.ilCalendarBlockGUI.php.

Referenced by ilCalendarBlockGUI().

◆ $st_data

ilCalendarBlockGUI::$st_data
static

Definition at line 47 of file class.ilCalendarBlockGUI.php.


The documentation for this class was generated from the following file: