ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCalendarSubscriptionGUI Class Reference

Show calendar subscription info. More...

+ Collaboration diagram for ilCalendarSubscriptionGUI:

Public Member Functions

 __construct ($a_calendar_id)
 Constructor.
 getCalendarId ()
 Get current calendar id.
 getCalendar ()
 executeCommand ()
 Execute command.

Protected Member Functions

 show ()
 Show subscription info.

Private Member Functions

 createToken ()
 Create calendar token.

Private Attributes

 $cal_id = 0
 $calendar = null

Detailed Description

Show calendar subscription info.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Id:
class.ilCalendarSubscriptionGUI.php 49967 2014-05-12 09:04:46Z smeyer

Definition at line 12 of file class.ilCalendarSubscriptionGUI.php.

Constructor & Destructor Documentation

ilCalendarSubscriptionGUI::__construct (   $a_calendar_id)

Constructor.

Parameters
int$a_clendar_id

Definition at line 21 of file class.ilCalendarSubscriptionGUI.php.

{
$this->cal_id = $a_calendar_id;
include_once './Services/Calendar/classes/class.ilCalendarCategory.php';
$this->calendar = new ilCalendarCategory($this->cal_id);
}

Member Function Documentation

ilCalendarSubscriptionGUI::createToken ( )
private

Create calendar token.

Definition at line 85 of file class.ilCalendarSubscriptionGUI.php.

References $GLOBALS, getCalendarId(), ilCalendarAuthenticationToken\lookupAuthToken(), and ilCalendarAuthenticationToken\SELECTION_CALENDAR.

Referenced by show().

{
include_once './Services/Calendar/classes/class.ilCalendarAuthenticationToken.php';
$GLOBALS['ilUser']->getId(),
$this->getCalendarId()
);
if(strlen($hash))
{
return $hash;
}
$token = new ilCalendarAuthenticationToken($GLOBALS['ilUser']->getId());
$token->setCalendar($this->getCalendarId());
return $token->add();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCalendarSubscriptionGUI::executeCommand ( )

Execute command.

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

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass($this);
switch($next_class)
{
default:
$cmd = $ilCtrl->getCmd("show");
$this->$cmd();
break;
}
return true;
}
ilCalendarSubscriptionGUI::getCalendar ( )

Definition at line 37 of file class.ilCalendarSubscriptionGUI.php.

Referenced by show().

{
return $this->calendar ? $this->calendar : new ilCalendarCategory();
}

+ Here is the caller graph for this function:

ilCalendarSubscriptionGUI::getCalendarId ( )

Get current calendar id.

Returns
<type>

Definition at line 32 of file class.ilCalendarSubscriptionGUI.php.

References $cal_id.

Referenced by createToken().

{
return $this->cal_id;
}

+ Here is the caller graph for this function:

ilCalendarSubscriptionGUI::show ( )
protected

Show subscription info.

Definition at line 64 of file class.ilCalendarSubscriptionGUI.php.

References $GLOBALS, createToken(), getCalendar(), and ilUtil\sendInfo().

{
$token = $this->createToken();
ilUtil::sendInfo($GLOBALS['lng']->txt('cal_subscription_info'));
include_once './Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
$info = new ilInfoScreenGUI($this);
$info->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));
$hash = $this->createToken();
$url = ILIAS_HTTP_PATH.'/calendar.php?client_id='.CLIENT_ID.'&token='.$hash;
$info->addSection($this->getCalendar()->getTitle());
$info->addProperty($GLOBALS['lng']->txt('cal_ical_url'), $url, $url);
$GLOBALS['tpl']->setContent($info->getHTML());
}

+ Here is the call graph for this function:

Field Documentation

ilCalendarSubscriptionGUI::$cal_id = 0
private

Definition at line 14 of file class.ilCalendarSubscriptionGUI.php.

Referenced by getCalendarId().

ilCalendarSubscriptionGUI::$calendar = null
private

Definition at line 15 of file class.ilCalendarSubscriptionGUI.php.


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