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

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Is this a repository object.
static getScreenMode ()
 Get Screen Mode for current command.

Data Fields

 $ctrl = null

Static Public Attributes

static $block_type = "cal"
static $st_data

Protected Member Functions

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

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

ilCalendarBlockGUI::addCloseCommand (   $a_content_block)

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

References $ilCtrl, and $lng.

{
global $lng, $ilCtrl;
$a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
$lng->txt("close"), true);
}
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().

{
global $ilCtrl, $lng,$ilUser;
// weekdays
include_once('Services/Calendar/classes/class.ilCalendarUtil.php');
$a_tpl->setCurrentBlock('month_header_col');
$a_tpl->setVariable('TXT_WEEKDAY', $lng->txt("cal_week_abbrev"));
$a_tpl->parseCurrentBlock();
for($i = (int) $this->user_settings->getWeekStart();$i < (7 + (int) $this->user_settings->getWeekStart());$i++)
{
$a_tpl->setCurrentBlock('month_header_col');
$a_tpl->setVariable('TXT_WEEKDAY',ilCalendarUtil::_numericDayToString($i,false));
$a_tpl->parseCurrentBlock();
}
if(isset($_GET["bkid"]))
{
$user_id = $_GET["bkid"];
$disable_empty = true;
}
else
{
$user_id = $ilUser->getId();
$disable_empty = false;
}
include_once('Services/Calendar/classes/class.ilCalendarSchedule.php');
$this->scheduler = new ilCalendarSchedule($this->seed,ilCalendarSchedule::TYPE_MONTH,$user_id,$disable_empty);
$this->scheduler->addSubitemCalendars(true);
$this->scheduler->calculate();
$counter = 0;
foreach(ilCalendarUtil::_buildMonthDayList($this->seed->get(IL_CAL_FKT_DATE,'m'),
$this->seed->get(IL_CAL_FKT_DATE,'Y'),
$this->user_settings->getWeekStart())->get() as $date)
{
$counter++;
$events = $this->scheduler->getByDay($date,$ilUser->getTimeZone());
$has_events = (bool)count($events);
if($has_events || !$disable_empty)
{
$a_tpl->setCurrentBlock('month_col_link');
}
else
{
$a_tpl->setCurrentBlock('month_col_no_link');
}
if($disable_empty)
{
if(!$has_events)
{
$a_tpl->setVariable('DAY_CLASS','calminiinactive');
}
else
{
$week_has_events = true;
include_once 'Services/Booking/classes/class.ilBookingEntry.php';
foreach($events as $event)
{
$booking = new ilBookingEntry($event['event']->getContextId());
if($booking->hasBooked($event['event']->getEntryId()))
{
$a_tpl->setVariable('DAY_CLASS','calminiapp');
break;
}
}
}
}
elseif($has_events)
{
$week_has_events = true;
$a_tpl->setVariable('DAY_CLASS','calminiapp');
}
$day = $date->get(IL_CAL_FKT_DATE,'j');
$month = $date->get(IL_CAL_FKT_DATE,'n');
$month_day = $day;
$ilCtrl->clearParametersByClass('ilcalendardaygui');
$ilCtrl->setParameterByClass('ilcalendardaygui','seed',$date->get(IL_CAL_DATE));
$a_tpl->setVariable('OPEN_DAY_VIEW', $ilCtrl->getLinkTargetByClass('ilcalendardaygui',''));
$ilCtrl->clearParametersByClass('ilcalendardaygui');
$a_tpl->setVariable('MONTH_DAY',$month_day);
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock('month_col');
include_once('./Services/Calendar/classes/class.ilCalendarUtil.php');
{
$a_tpl->setVariable('TD_CLASS','calminitoday');
}
#elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_DAY))
#{
# $a_tpl->setVariable('TD_CLASS','calmininow');
#}
elseif(ilDateTime::_equals($date,$this->seed,IL_CAL_MONTH))
{
$a_tpl->setVariable('TD_CLASS','calministd');
}
elseif(ilDateTime::_before($date,$this->seed,IL_CAL_MONTH))
{
$a_tpl->setVariable('TD_CLASS','calminiprev');
}
else
{
$a_tpl->setVariable('TD_CLASS','calmininext');
}
$a_tpl->parseCurrentBlock();
if($counter and !($counter % 7))
{
if(!$disable_empty || $week_has_events)
{
$a_tpl->setCurrentBlock('month_row_link');
$ilCtrl->clearParametersByClass('ilcalendarweekgui');
$ilCtrl->setParameterByClass('ilcalendarweekgui','seed',$date->get(IL_CAL_DATE));
$a_tpl->setVariable('OPEN_WEEK_VIEW', $ilCtrl->getLinkTargetByClass('ilcalendarweekgui',''));
$ilCtrl->clearParametersByClass('ilcalendarweekgui');
}
else
{
$a_tpl->setCurrentBlock('month_row_no_link');
$a_tpl->setVariable('WEEK_CLASS', 'calminiinactive');
}
$a_tpl->setVariable('WEEK',
$date->get(IL_CAL_FKT_DATE,'W'));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock('month_row');
$a_tpl->setVariable('TD_CLASS','calminiweek');
$a_tpl->parseCurrentBlock();
$week_has_events = false;
}
}
$a_tpl->setCurrentBlock('mini_month');
$a_tpl->setVariable('TXT_MONTH_OVERVIEW', $lng->txt("cal_month_overview"));
$a_tpl->setVariable('TXT_MONTH',
$lng->txt('month_'.$this->seed->get(IL_CAL_FKT_DATE,'m').'_long').
' '.$this->seed->get(IL_CAL_FKT_DATE,'Y'));
$myseed = clone($this->seed);
$ilCtrl->setParameterByClass('ilcalendarmonthgui','seed',$myseed->get(IL_CAL_DATE));
$a_tpl->setVariable('OPEN_MONTH_VIEW',$ilCtrl->getLinkTargetByClass('ilcalendarmonthgui',''));
$myseed->increment(ilDateTime::MONTH, -1);
$ilCtrl->setParameter($this,'seed',$myseed->get(IL_CAL_DATE));
$a_tpl->setVariable('BL_TYPE', $this->getBlockType());
$a_tpl->setVariable('BL_ID', $this->getBlockId());
$a_tpl->setVariable('PREV_MONTH',
$ilCtrl->getLinkTarget($this, "setSeed"));
$a_tpl->setVariable('PREV_MONTH_ASYNC',
$ilCtrl->getLinkTarget($this, "setSeed", "", true));
$myseed->increment(ilDateTime::MONTH, 2);
$ilCtrl->setParameter($this,'seed',$myseed->get(IL_CAL_DATE));
$a_tpl->setVariable('NEXT_MONTH',
$ilCtrl->getLinkTarget($this, "setSeed"));
$a_tpl->setVariable('NEXT_MONTH_ASYNC',
$ilCtrl->getLinkTarget($this, "setSeed", "", true));
$ilCtrl->setParameter($this, 'seed', "");
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilCalendarBlockGUI::executeCommand ( )

execute command

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

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

{
global $ilCtrl,$ilTabs;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
$this->setSubTabs();
switch ($next_class)
{
case "ilcalendarappointmentgui":
include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
$app_gui = new ilCalendarAppointmentGUI($this->seed,$this->seed);
$ilCtrl->forwardCommand($app_gui);
break;
case "ilcalendardaygui":
$ilTabs->setSubTabActive('app_day');
include_once('./Services/Calendar/classes/class.ilCalendarDayGUI.php');
$day_gui = new ilCalendarDayGUI($this->seed);
$ilCtrl->forwardCommand($day_gui);
break;
case "ilcalendarweekgui":
$ilTabs->setSubTabActive('app_week');
include_once('./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
$week_gui = new ilCalendarWeekGUI($this->seed);
$ilCtrl->forwardCommand($week_gui);
break;
case "ilcalendarmonthgui":
$ilTabs->setSubTabActive('app_month');
include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
$month_gui = new ilCalendarMonthGUI($this->seed);
$ilCtrl->forwardCommand($month_gui);
break;
case "ilcalendarinboxgui":
include_once('./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
$inbox = new ilCalendarInboxGUI($this->seed);
$ilCtrl->forwardCommand($inbox);
break;
case "ilconsultationhoursgui":
include_once('./Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursGUI.php');
$hours = new ilConsultationHoursGUI($this->seed);
$ilCtrl->forwardCommand($hours);
break;
default:
return $this->$cmd();
}
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

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

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

{
// alex: changed from > 1 to > 0 - original detail level 1 did not work anymore
if ($this->getCurrentDetailLevel() > 0 && $this->display_mode != "mmon")
{
$this->setColSpan(1);
$this->tpl->addBlockFile("BLOCK_ROW", "block_row","tpl.pd_event_list.html", "Services/Calendar");
}
else
{
// alex: changed from > 1 to > 0 - original detail level 1 did not work anymore
if ($this->getCurrentDetailLevel() > 0)
{
$tpl = new ilTemplate("tpl.calendar_block.html", true, true,
"Services/Calendar");
$this->addMiniMonth($tpl);
$this->setDataSection($tpl->get());
}
else
{
$this->setDataSection($this->getOverview());
}
}
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::fillFooter ( )

Reimplemented from ilBlockGUI.

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

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

{
global $ilCtrl, $lng, $ilUser;
$this->setFooterLinks();
$this->fillFooterLinks();
$this->tpl->setVariable("FCOLSPAN", $this->getColSpan());
if ($this->tpl->blockExists("block_footer"))
{
$this->tpl->setCurrentBlock("block_footer");
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

static ilCalendarBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Reimplemented in ilPDCalendarBlockGUI.

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

References $block_type.

Referenced by addMiniMonth(), and ilCalendarBlockGUI().

{
}

+ Here is the caller graph for this function:

ilCalendarBlockGUI::getData ( )

Get Data.

Returns
array Data

Reimplemented from ilBlockGUI.

Definition at line 807 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.

{
global $ilCtrl, $lng;
$seed = new ilDate(date('Y-m-d',time()),IL_CAL_DATE);
include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
$schedule->addSubitemCalendars(true); // #12007
$schedule->setEventsLimit(20);
$schedule->calculate();
$events = $schedule->getScheduledEvents(); // #13809
$data = array();
if(sizeof($events))
{
foreach($events as $item)
{
$start = $item["dstart"];
$end = $item["dend"];
if($item["fullday"])
{
$start = new ilDate($start, IL_CAL_UNIX);
$end = new ilDate($end, IL_CAL_UNIX);
}
else
{
$start = new ilDateTime($start, IL_CAL_UNIX);
$end = new ilDateTime($end, IL_CAL_UNIX);
}
$ilCtrl->clearParametersByClass('ilcalendardaygui');
$ilCtrl->setParameterByClass('ilcalendardaygui','seed', $start->get(IL_CAL_DATE));
$link = $ilCtrl->getLinkTargetByClass('ilcalendardaygui','');
$ilCtrl->clearParametersByClass('ilcalendardaygui');
$data[] = array(
"date" => ilDatePresentation::formatPeriod($start, $end),
"title" => $item["event"]->getPresentationTitle(),
"url" => $link
);
}
$this->setEnableNumInfo(true);
}
else
{
$data[] = array(
"date" => $lng->txt("msg_no_search_result"),
"title" => "",
"url" => ""
);
$this->setEnableNumInfo(false);
}
return $data;
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean Edit mode on/off

Reimplemented from ilBlockGUI.

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

{
return $this->enable_edit;
}
ilCalendarBlockGUI::getHTML ( )

Get bloch HTML code.

Reimplemented from ilBlockGUI.

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\isBookable(), ilCalendarCategories\MODE_PERSONAL_DESKTOP_ITEMS, ilCalendarCategories\MODE_PERSONAL_DESKTOP_MEMBERSHIP, and ilCalendarCategories\MODE_REPOSITORY.

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

{
global $ilCtrl, $lng, $ilUser,$ilAccess;
if ($this->getCurrentDetailLevel() == 0)
{
return "";
}
// add edit commands
#if ($this->getEnableEdit())
{
$this->ctrl->getLinkTarget($this,'showCalendarSubscription'),
$lng->txt('ical_export'),
'',
ilUtil::getImagePath('ical.png','Services/Calendar'),
true
);
}
{
if(!isset($_GET["bkid"]))
{
if($ilAccess->checkAccess('edit_event','',(int) $_GET['ref_id']))
{
$ilCtrl->setParameter($this, "add_mode", "block");
$ilCtrl->getLinkTargetByClass("ilCalendarAppointmentGUI",
"add"),
$lng->txt("add_appointment"));
$ilCtrl->setParameter($this, "add_mode", "");
}
global $ilObjDataCache;
include_once "Modules/Course/classes/class.ilCourseParticipants.php";
$obj_id = $ilObjDataCache->lookupObjId((int) $_GET['ref_id']);
$users = array_unique(array_merge($participants->getTutors(), $participants->getAdmins()));
include_once 'Services/Booking/classes/class.ilBookingEntry.php';
$users = ilBookingEntry::isBookable($users, $obj_id);
if($users)
{
foreach($users as $user_id)
{
if(!isset($_GET["bkid"]) || $_GET["bkid"] != $user_id)
{
$ilCtrl->setParameter($this, "bkid", $user_id);
$ilCtrl->getLinkTargetByClass("ilCalendarMonthGUI",
""),
$lng->txt("cal_consultation_hours_for").' '.ilObjUser::_lookupFullname($user_id));
}
}
$ilCtrl->setParameter($this, "bkid", "");
}
}
else
{
$ilCtrl->setParameter($this, "bkid", "");
$ilCtrl->getLinkTarget($this),
$lng->txt("back"));
$ilCtrl->setParameter($this, "bkid", (int)$_GET["bkid"]);
}
}
if ($this->getProperty("settings") == true)
{
$ilCtrl->getLinkTarget($this, "editSettings"),
$lng->txt("settings"));
}
$ilCtrl->setParameterByClass("ilcolumngui", "seed", isset($_GET["seed"]) ? $_GET["seed"] : "");
$ilCtrl->setParameterByClass("ilcolumngui", "seed", "");
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarBlockGUI::getOverview ( )

Get overview.

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

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

Referenced by fillDataSection().

{
global $ilUser, $lng, $ilCtrl;
include_once('./Services/Calendar/classes/class.ilCalendarSchedule.php');
$schedule = new ilCalendarSchedule($this->seed,ilCalendarSchedule::TYPE_INBOX);
$events = $schedule->getChangedEvents(true);
$ilCtrl->setParameterByClass('ilcalendarinboxgui', 'changed', 1);
$link = '<a href='.$ilCtrl->getLinkTargetByClass('ilcalendarinboxgui','').'>';
$ilCtrl->setParameterByClass('ilcalendarinboxgui', 'changed', '');
$text = '<div class="small">'.((int) count($events))." ".$lng->txt("cal_changed_events_header")."</div>";
$end_link = '</a>';
return $link.$text.$end_link;
}

+ Here is the caller graph for this function:

static ilCalendarBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

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

References $_GET, $ilCtrl, and IL_SCREEN_CENTER.

{
global $ilCtrl;
$cmd_class = $ilCtrl->getCmdClass();
if ($cmd_class == "ilcalendarappointmentgui" ||
$cmd_class == "ilcalendardaygui" ||
$cmd_class == "ilcalendarweekgui" ||
$cmd_class == "ilcalendarmonthgui" ||
$cmd_class == "ilcalendarinboxgui" ||
$cmd_class == "ilconsultationhoursgui" ||
$_GET['cmd'] == 'showCalendarSubscription')
{
}
switch($ilCtrl->getCmd())
{
case "kkk":
// return IL_SCREEN_CENTER;
// return IL_SCREEN_FULL;
default:
//return IL_SCREEN_SIDE;
break;
}
}
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, $title, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ilObjUser\_lookupFullname(), ilBlockGUI\getBlockId(), getBlockType(), ilUtil\getImagePath(), IL_CAL_DATE, IL_CAL_UNIX, ilBlockGUI\ilBlockGUI(), initCategories(), ilBlockGUI\setAvailableDetailLevels(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setImage(), ilBlockGUI\setLimit(), and ilBlockGUI\setTitle().

Referenced by ilPDCalendarBlockGUI\ilPDCalendarBlockGUI().

{
global $ilCtrl, $lng, $ilUser, $tpl, $ilHelp;
$this->ctrl = $ilCtrl;
$this->setImage(ilUtil::getImagePath("icon_cals_s.png"));
$lng->loadLanguageModule("dateplaner");
$ilHelp->addHelpSection("cal_block");
include_once("./Services/News/classes/class.ilNewsItem.php");
$ilCtrl->saveParameter($this, 'bkid');
if (!$a_skip_init)
{
$this->initCategories();
$this->setBlockId($ilCtrl->getContextObjId());
}
$this->setLimit(5); // @todo: needed?
// alex: original detail level 1 did not work anymore
$this->setEnableNumInfo(false);
if(!isset($_GET["bkid"]))
{
$title = $lng->txt("calendar");
}
else
{
$title = $lng->txt("cal_consultation_hours_for")." ".ilObjUser::_lookupFullname($_GET["bkid"]);
}
$this->setTitle($title);
//$this->setData($data);
$this->allow_moving = false;
//$this->handleView();
include_once('Services/Calendar/classes/class.ilDate.php');
include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
$seed_str = "";
if ((!isset($_GET["seed"]) || $_GET["seed"] == "") &&
isset($_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"]))
{
$seed_str = $_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"];
}
else if (isset($_GET["seed"]))
{
$seed_str = $_GET["seed"];
}
if (isset($_GET["seed"]) && $_GET["seed"] != "")
{
$_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"]
= $_GET["seed"];
}
if ($seed_str == "")
{
$this->seed = new ilDate(time(),IL_CAL_UNIX); // @todo: check this
}
else
{
$this->seed = new ilDate($seed_str,IL_CAL_DATE); // @todo: check this
}
$this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
$tpl->addCSS("./Services/Calendar/css/calendar.css");
// @todo: this must work differently...
$tpl->addCSS("./Services/Calendar/templates/default/delos.css");
$mode = $ilUser->getPref("il_pd_cal_mode");
$this->display_mode = $mode ? $mode : "mmon";
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarBlockGUI::initCategories ( )
protected

init categories

protected

Parameters
@return

Reimplemented in ilPDCalendarBlockGUI.

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

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

Referenced by ilCalendarBlockGUI().

{
include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
if(!isset($_GET['bkid']))
{
}
else
{
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilCalendarBlockGUI::isRepositoryObject ( )
static

Is this a repository object.

Returns
string Block type.

Reimplemented from ilBlockGUI.

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

{
return false;
}
ilCalendarBlockGUI::returnToUpperContext ( )

Return to upper context.

Reimplemented in ilPDCalendarBlockGUI.

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

References $ilCtrl.

Referenced by setSeed().

{
global $ilCtrl;
$ilCtrl->returnToParent($this);
}

+ Here is the caller graph for this function:

ilCalendarBlockGUI::setEnableEdit (   $a_enable_edit = 0)

Set EnableEdit.

Parameters
boolean$a_enable_editEdit mode on/off

Reimplemented from ilBlockGUI.

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

{
$this->enable_edit = $a_enable_edit;
}
ilCalendarBlockGUI::setFooterLinks ( )

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

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

Referenced by fillFooter().

{
global $ilCtrl, $lng;
// alex: changed from < 2 to < 1 - original detail level 1 did not work anymore
if ($this->getCurrentDetailLevel() < 1)
{
return;
}
// if ($this->display_mode == 'mmon')
// {
// $this->addFooterLink($lng->txt("month"));
$this->addFooterLink($lng->txt("cal_upcoming_events_header"),
$ilCtrl->getLinkTarget($this, "setPdModeEvents"),
$ilCtrl->getLinkTarget($this, "setPdModeEvents", "", true),
"block_".$this->getBlockType()."_".$this->block_id,
false, false, ($this->display_mode != 'mmon'));
// }
// else
// {
$this->addFooterLink( $lng->txt("app_month"),
$ilCtrl->getLinkTarget($this, "setPdModeMonth"),
$ilCtrl->getLinkTarget($this, "setPdModeMonth", "", true),
"block_".$this->getBlockType()."_".$this->block_id,
false, false, ($this->display_mode == 'mmon'));
// $this->addFooterLink($lng->txt("cal_upcoming_events_header"));
// }
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarBlockGUI::setPdModeEvents ( )

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

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

{
global $ilUser, $ilCtrl;
$ilUser->writePref("il_pd_cal_mode", "evt");
$this->display_mode = "evt";
if ($ilCtrl->isAsynch())
{
echo $this->getHTML();
}
else
{
$ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
}
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::setPdModeMonth ( )

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

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

{
global $ilUser, $ilCtrl;
$ilUser->writePref("il_pd_cal_mode", "mmon");
$this->display_mode = "mmon";
if ($ilCtrl->isAsynch())
{
echo $this->getHTML();
}
else
{
$ilCtrl->redirectByClass("ilpersonaldesktopgui", "show");
}
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::setSeed ( )

Set seed.

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

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

{
global $ilCtrl, $ilUser;
//$ilUser->writePref("il_pd_bkm_mode", 'flat');
$_SESSION["il_cal_block_".$this->getBlockType()."_".$this->getBlockId()."_seed"] =
$_GET["seed"];
if ($ilCtrl->isAsynch())
{
echo $this->getHTML();
}
else
{
}
}

+ Here is the call graph for this function:

ilCalendarBlockGUI::setSubTabs ( )
protected
Parameters
@return

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

References $_GET.

Referenced by executeCommand().

{
global $ilTabs;
$ilTabs->clearSubTabs();
return true;
// TODO: needs another switch
if($_GET['ref_id'])
{
$ilTabs->addSubTabTarget('app_day',$this->ctrl->getLinkTargetByClass('ilCalendarDayGUI',''));
$ilTabs->addSubTabTarget('app_week',$this->ctrl->getLinkTargetByClass('ilCalendarWeekGUI',''));
$ilTabs->addSubTabTarget('app_month',$this->ctrl->getLinkTargetByClass('ilCalendarMonthGUI',''));
}
return true;
}

+ Here is the caller graph for this function:

ilCalendarBlockGUI::showCalendarSubscription ( )

Definition at line 672 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().

{
global $lng, $ilUser;
$tpl = new ilTemplate('tpl.show_calendar_subscription.html',true,true,'Services/Calendar');
$tpl->setVariable('TXT_TITLE',$lng->txt('cal_subscription_header'));
$tpl->setVariable('TXT_INFO',$lng->txt('cal_subscription_info'));
$tpl->setVariable('TXT_CAL_URL',$lng->txt('cal_subscription_url'));
include_once './Services/Calendar/classes/class.ilCalendarAuthenticationToken.php';
switch($this->mode)
{
$calendar = 0;
break;
default:
// TODO: calendar id
$calendar = ilObject::_lookupObjId((int) $_GET['ref_id']);
break;
}
if($hash = ilCalendarAuthenticationToken::lookupAuthToken($ilUser->getId(), $selection, $calendar))
{
}
else
{
$token = new ilCalendarAuthenticationToken($ilUser->getId());
$token->setSelectionType($selection);
$token->setCalendar($calendar);
$hash = $token->add();
}
$url = ILIAS_HTTP_PATH.'/calendar.php?client_id='.CLIENT_ID.'&token='.$hash;
$tpl->setVariable('VAL_CAL_URL',$url);
$tpl->setVariable('VAL_CAL_URL_TXT',$url);
include_once("./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
$content_block = new ilPDContentBlockGUI();
$content_block->setContent($tpl->get());
$content_block->setTitle($lng->txt("calendar"));
#$content_block->setImage(ilUtil::getImagePath("icon_news.png"));
$content_block->addHeaderCommand($this->ctrl->getParentReturn($this),
$lng->txt("selected_items_back"));
return $content_block->getHTML();
}

+ Here is the call graph for this function:

Field Documentation

ilCalendarBlockGUI::$block_type = "cal"
static

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

Referenced by getBlockType().

ilCalendarBlockGUI::$ctrl = null

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

ilCalendarBlockGUI::$display_mode
protected

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

ilCalendarBlockGUI::$mode
protected

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

Referenced by ilCalendarBlockGUI().

ilCalendarBlockGUI::$st_data
static

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


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