$date]) ); } $this->setViewState($key, $datetime); } public function setDateFrom($date) { $this->_setDate('DateFrom', $date); } public function getDateFrom() { return $this->getViewState('DateFrom'); } public function setDateTo($date) { $this->_setDate('DateTo', $date); } public function getDateTo() { return $this->getViewState('DateTo'); } public function setHeaderText($text) { $this->setViewState('HeaderText', TPropertyValue::ensureString($text)); } public function getHeaderText() { return $this->getViewState('HeaderText'); } public function setReverse($value) { $this->setViewState('Reverse', TPropertyValue::ensureBoolean($value)); } public function getReverse() { return $this->getViewState('Reverse'); } public function getEvents() { return $this->getFacade()->getEventsForTimeframe( $this->getCalendar(), $this->getDateFrom() ?: new DateTime('0000-00-00'), $this->getDateTo() ?: new DateTime('9999-99-99'), $this->getReverse() ? 'DESC' : 'ASC' ); } } ?>