summaryrefslogtreecommitdiff
path: root/app/php/controls/EventList.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/php/controls/EventList.php')
-rw-r--r--app/php/controls/EventList.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/app/php/controls/EventList.php b/app/php/controls/EventList.php
deleted file mode 100644
index d40e000..0000000
--- a/app/php/controls/EventList.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-class EventList extends UrlBasedCalendarControl {
-
- private function _setDate($key, $date) {
- $datetime = new DateTime($date, new DateTimeZone('UTC'));
- if (!$datetime) {
- throw new TInvalidDataValueException(
- Prado::localize('Invalid date string: {date}',
- ['date' => $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'
- );
- }
-
-}
-
-?>