ILIAS  Release_4_1_x_branch Revision 61804
 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 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, ilDateTime\MONTH, and ilDateTime\WEEK.

{
global $lng;
$this->tpl = new ilTemplate('tpl.navigation_header.html',true,true,'Services/Calendar');
$this->seed->increment($this->increment,-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->seed->increment($this->increment,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:

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: