ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCalendarHeaderNavigationGUI Class Reference
+ Collaboration diagram for ilCalendarHeaderNavigationGUI:

Public Member Functions

 __construct ($cmdClass, ilDate $seed, $a_increment, $cmd= '')
 Constructor.
 getHTML ()
 getHTML

Protected Member Functions

 incrementDate ($a_count)

Protected Attributes

 $cmdClass = null
 $cmd = null
 $seed = null
 $increment = ''
 $html
 $lng
 $tpl

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 36 of file class.ilCalendarHeaderNavigationGUI.php.

Constructor & Destructor Documentation

ilCalendarHeaderNavigationGUI::__construct (   $cmdClass,
ilDate  $seed,
  $a_increment,
  $cmd = '' 
)

Constructor.

public

Parameters
objectilDate seed for navigation string type MONTH WEEK DAY

Definition at line 55 of file class.ilCalendarHeaderNavigationGUI.php.

References $cmd, $cmdClass, $ilCtrl, $lng, and $seed.

{
global $lng,$ilCtrl;
$this->lng = $lng;
$this->ctrl = $ilCtrl;
$this->cmdClass = $cmdClass;
$this->seed = clone $seed;
$this->increment = $a_increment;
$this->cmd = $cmd;
}

Member Function Documentation

ilCalendarHeaderNavigationGUI::getHTML ( )

getHTML

public

Definition at line 74 of file class.ilCalendarHeaderNavigationGUI.php.

References $lng, ilCalendarUtil\_numericDayToString(), ilDateTime\DAY, IL_CAL_DATE, IL_CAL_FKT_DATE, incrementDate(), ilDateTime\MONTH, and ilDateTime\WEEK.

{
global $lng;
$this->tpl = new ilTemplate('tpl.navigation_header.html',true,true,'Services/Calendar');
$this->incrementDate(-2);
$num = 0;
do
{
switch($this->increment)
{
$this->tpl->setVariable('NAV_NAME_'.++$num,ilCalendarUtil::_numericDayToString($this->seed->get(IL_CAL_FKT_DATE,'w')));
break;
$this->tpl->setVariable('NAV_NAME_'.++$num,$this->lng->txt('week').' '.$this->seed->get(IL_CAL_FKT_DATE,'W'));
break;
if($num == 2)
{
$this->tpl->setVariable('NAV_NAME_'.++$num,
$this->lng->txt('month_'.$this->seed->get(IL_CAL_FKT_DATE,'m').'_long').
' '.$this->seed->get(IL_CAL_FKT_DATE,'Y'));
}
else
{
$this->tpl->setVariable('NAV_NAME_'.++$num,$this->lng->txt('month_'.$this->seed->get(IL_CAL_FKT_DATE,'m').'_long'));
}
break;
}
$this->ctrl->setParameterByClass(get_class($this->cmdClass),'seed',$this->seed->get(IL_CAL_DATE));
$this->tpl->setVariable('NAV_LINK_'.$num,$this->ctrl->getLinkTarget($this->cmdClass,$this->cmd));
// $this->ctrl->clearParametersByClass(get_class($this->cmdClass));
$this->ctrl->setParameterByClass(get_class($this->cmdClass),'seed','');
$this->incrementDate(1);
} while($num < 6);
// header
switch ($this->increment)
{
$this->tpl->setVariable('TXT_SELECT_TITLE', $lng->txt("cal_day_selection"));
$this->tpl->setVariable('TXT_VIEW_HEAD', $lng->txt("cal_day_overview"));
break;
$this->tpl->setVariable('TXT_SELECT_TITLE', $lng->txt("cal_week_selection"));
$this->tpl->setVariable('TXT_VIEW_HEAD', $lng->txt("cal_week_overview"));
break;
$this->tpl->setVariable('TXT_SELECT_TITLE', $lng->txt("cal_month_selection"));
$this->tpl->setVariable('TXT_VIEW_HEAD', $lng->txt("cal_month_overview"));
break;
}
$this->tpl->setVariable('TXT_SELECTED', $lng->txt("stat_selected"));
return $this->tpl->get();
}

+ Here is the call graph for this function:

ilCalendarHeaderNavigationGUI::incrementDate (   $a_count)
protected

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

References IL_CAL_DAY, IL_CAL_FKT_DATE, and ilDateTime\MONTH.

Referenced by getHTML().

{
switch($this->increment)
{
$day = $this->seed->get(IL_CAL_FKT_DATE,'j');
if($day > 28)
{
$this->seed->increment(IL_CAL_DAY, (31 - $day) * -1);
}
default:
$this->seed->increment($this->increment,$a_count);
break;
}
}

+ Here is the caller graph for this function:

Field Documentation

ilCalendarHeaderNavigationGUI::$cmd = null
protected

Definition at line 39 of file class.ilCalendarHeaderNavigationGUI.php.

Referenced by __construct().

ilCalendarHeaderNavigationGUI::$cmdClass = null
protected

Definition at line 38 of file class.ilCalendarHeaderNavigationGUI.php.

Referenced by __construct().

ilCalendarHeaderNavigationGUI::$html
protected

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

ilCalendarHeaderNavigationGUI::$increment = ''
protected

Definition at line 41 of file class.ilCalendarHeaderNavigationGUI.php.

ilCalendarHeaderNavigationGUI::$lng
protected

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

Referenced by __construct(), and getHTML().

ilCalendarHeaderNavigationGUI::$seed = null
protected

Definition at line 40 of file class.ilCalendarHeaderNavigationGUI.php.

Referenced by __construct().

ilCalendarHeaderNavigationGUI::$tpl
protected

Definition at line 45 of file class.ilCalendarHeaderNavigationGUI.php.


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