Kronolith_Event_Sql::__construct PHP Method

__construct() public method

Constructor.
public __construct ( Kronolith_Driver $driver, mixed $eventObject = null )
$driver Kronolith_Driver The backend driver that this event is stored in.
$eventObject mixed Backend specific event object that this will represent.
    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();
        }
    }