Skip to content

Commit

Permalink
Calendar Classes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexEdimensionz committed Jun 3, 2019
1 parent d225243 commit 7d2608d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions ext/calendar/model/TodoyuCalendarEventElement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7d2608d

Please sign in to comment.