public function __construct(Kronolith_Driver $driver, $eventObject = null)
{
/* Set default alarm value. */
if (isset($GLOBALS['prefs'])) {
$this->alarm = $GLOBALS['prefs']->getValue('default_alarm');
}
parent::__construct($driver, $eventObject);
if (!empty($this->calendar) && $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $this->calendar) !== false) {
$this->_backgroundColor = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $this->calendar)->background();
$this->_foregroundColor = $GLOBALS['calendar_manager']->getEntry(Kronolith::ALL_CALENDARS, $this->calendar)->foreground();
}
}