diff --git a/ext/calendar/model/TodoyuCalendarEventElement.class.php b/ext/calendar/model/TodoyuCalendarEventElement.class.php index e3b3af2..28af41d 100644 --- a/ext/calendar/model/TodoyuCalendarEventElement.class.php +++ b/ext/calendar/model/TodoyuCalendarEventElement.class.php @@ -172,8 +172,8 @@ public function getClasses() { * @param Integer * @return Array */ - public function getTemplateData(TodoyuDayRange $range) { - $elementTemplateData= $this->getElementTemplateData($range); + public function getTemplateData($date = 0) { + $elementTemplateData= $this->getElementTemplateData($date); $eventTemplateData = $this->getEvent()->getTemplateData(true); return array_merge($eventTemplateData, $elementTemplateData); @@ -213,7 +213,7 @@ protected function getColor() { * @param Integer $date * @return Array */ - protected function getElementTemplateData(TodoyuDayRange $range) { + protected function getElementTemplateData($date = 0) { $elementData = array(); // Add base classes diff --git a/ext/calendar/model/TodoyuCalendarEventElementDayWeek.class.php b/ext/calendar/model/TodoyuCalendarEventElementDayWeek.class.php index 70936af..2c1ae2b 100644 --- a/ext/calendar/model/TodoyuCalendarEventElementDayWeek.class.php +++ b/ext/calendar/model/TodoyuCalendarEventElementDayWeek.class.php @@ -52,7 +52,7 @@ abstract class TodoyuCalendarEventElementDayWeek extends TodoyuCalendarEventElem * @param Integer $date * @return Array */ - protected function getElementTemplateData(TodoyuDayRange $range) { + protected function getElementTemplateData($range = 0) { $elementData = parent::getElementTemplateData($range); $elementData['positionStyles'] = $this->getPositionStyleString($range); diff --git a/ext/calendar/model/TodoyuCalendarEventElementDayeventWeek.class.php b/ext/calendar/model/TodoyuCalendarEventElementDayeventWeek.class.php index 66d6614..058f7e9 100644 --- a/ext/calendar/model/TodoyuCalendarEventElementDayeventWeek.class.php +++ b/ext/calendar/model/TodoyuCalendarEventElementDayeventWeek.class.php @@ -53,11 +53,11 @@ public function __construct(TodoyuCalendarEventElementWeek $eventElement) { /** * Get event element templating data * - * @param TodoyuDayRange $range + * @param $date * @return Array */ - protected function getElementTemplateData(TodoyuDayRange $range) { - $data = parent::getElementTemplateData($range); + protected function getElementTemplateData($date = 0) { + $data = parent::getElementTemplateData($date); $data['titleCropLength']= TodoyuCalendarPreferences::isWeekendDisplayed() ? 11 : 16; @@ -94,8 +94,8 @@ protected function getTemplate() { * @param TodoyuDayRange $range Week in where the elements is rendered * @return Array */ - public function getTemplateData(TodoyuDayRange $range) { - $elementTemplateData= $this->getElementTemplateData($range); + public function getTemplateData($date = 0) { + $elementTemplateData= $this->getElementTemplateData($date); $eventTemplateData = $this->getEvent()->getTemplateData(true); return array_merge($eventTemplateData, $elementTemplateData); diff --git a/ext/calendar/model/TodoyuCalendarEventElementWeek.class.php b/ext/calendar/model/TodoyuCalendarEventElementWeek.class.php index 7bc339b..857712f 100644 --- a/ext/calendar/model/TodoyuCalendarEventElementWeek.class.php +++ b/ext/calendar/model/TodoyuCalendarEventElementWeek.class.php @@ -66,7 +66,7 @@ public function getViewName() { * @param Integer $date * @return Array */ - protected function getElementTemplateData(TodoyuDayRange $range) { + protected function getElementTemplateData($range = 0) { $data = parent::getElementTemplateData($range); $data['titleCropLength'] = $this->getView()->isWeekendDisplayed() ? 10 : 16;