function getListMarker(&$page, &$sims, &$rems, &$wrapped) { $rems['###LIST###'] = ''; $starttime = new \TYPO3\CMS\Cal\Model\CalDate($this->conf['getdate'] . '000000'); $starttime->setTZbyId('UTC'); $tx_cal_listview = GeneralUtility::makeInstanceService('cal_view', 'list', 'list'); // set alternate rendering view, so that the rendering of the attached listView can be customized $tempAlternateRenderingView = $tx_cal_listview->conf['alternateRenderingView']; $renderingView = $this->conf['view.'][$this->conf['view'] . '.']['useListEventRenderSettingsView']; $tx_cal_listview->conf['alternateRenderingView'] = $renderingView ? $renderingView : 'list'; $listSubpart = $this->cObj->getSubpart($page, '###LIST###'); if ($this->conf['view'] == 'month' && $this->conf['view.']['month.']['showListInMonthView']) { $starttime = \TYPO3\CMS\Cal\Controller\Calendar::calculateStartMonthTime($starttime); $endtime = \TYPO3\CMS\Cal\Controller\Calendar::calculateEndMonthTime($starttime); $rems['###LIST###'] = $tx_cal_listview->drawList($this->master_array, $listSubpart, $starttime, $endtime); } else { if ($this->conf['view'] == 'day') { $starttime = \TYPO3\CMS\Cal\Controller\Calendar::calculateStartDayTime($starttime); $endtime = \TYPO3\CMS\Cal\Controller\Calendar::calculateEndDayTime($starttime); $rems['###LIST###'] = $tx_cal_listview->drawList($this->master_array, $listSubpart, $starttime, $endtime); } else { if ($this->conf['view'] == 'week') { $starttime = \TYPO3\CMS\Cal\Controller\Calendar::calculateStartWeekTime($starttime); $endtime = \TYPO3\CMS\Cal\Controller\Calendar::calculateEndWeekTime($starttime); $rems['###LIST###'] = $tx_cal_listview->drawList($this->master_array, $listSubpart, $starttime, $endtime); } else { if ($this->conf['view'] == 'year') { $starttime = \TYPO3\CMS\Cal\Controller\Calendar::calculateStartYearTime($starttime); $endtime = \TYPO3\CMS\Cal\Controller\Calendar::calculateEndYearTime($starttime); $rems['###LIST###'] = $tx_cal_listview->drawList($this->master_array, $listSubpart, $starttime, $endtime); } } } } $tx_cal_listview->conf['alternateRenderingView'] = $tempAlternateRenderingView; }
function _parseString($value) { $value = strtolower($value); switch ($value) { case 'last': array_push($this->stack, array('range' => 'last')); break; case 'next': array_push($this->stack, array('range' => 'next')); break; case 'now': array_push($this->stack, array('abs' => $this->timeObj->getTime())); break; case 'today': array_push($this->stack, array('today' => $this->timeObj->getTime())); break; case 'current': array_push($this->stack, array('today' => $this->timeObj->getTime())); break; case 'tomorrow': array_push($this->stack, array('tomorrow' => $this->timeObj->getTime())); break; case 'yesterday': array_push($this->stack, array('yesterday' => $this->timeObj->getTime())); break; case 'yearstart': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateStartYearTime($this->timeObj))); break; case 'monthstart': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateStartMonthTime($this->timeObj))); break; case 'weekstart': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateStartWeekTime($this->timeObj))); break; case 'weekend': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateEndWeekTime($this->timeObj))); break; case 'monthend': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateEndMonthTime($this->timeObj))); break; case 'yearend': array_push($this->stack, array('date' => \TYPO3\CMS\Cal\Controller\Calendar::calculateEndYearTime($this->timeObj))); break; case 'quarterstart': $timeObj = $this->timeObj; $startMonth = '01'; switch ($timeObj->getQuarterOfYear()) { case 2: $startMonth = '04'; break; case 3: $startMonth = '07'; break; case 4: $startMonth = '10'; break; } $timeObj->setDay(1); $timeObj->setMonth($startMonth); $timeObj->setHour(0); $timeObj->setMinute(0); $timeObj->setSecond(0); array_push($this->stack, array('date' => $timeObj)); break; case 'quarterend': $timeObj = $this->timeObj; $endDay = '31'; $endMonth = '03'; switch ($timeObj->getQuarterOfYear()) { case 2: $endDay = '30'; $endMonth = '06'; break; case 3: $endDay = '30'; $endMonth = '09'; break; case 4: $endDay = '31'; $endMonth = '12'; break; } $timeObj->setDay($endDay); $timeObj->setMonth($endMonth); $timeObj->setHour(23); $timeObj->setMinute(59); $timeObj->setSecond(59); array_push($this->stack, array('date' => $timeObj)); break; case 'day': case 'days': array_push($this->stack, array('value' => 86400)); break; case 'week': case 'weeks': array_push($this->stack, array('value' => 604800)); break; case 'h': case 'hour': case 'hours': $value = array_pop(array_pop($this->stack)); array_push($this->stack, array('range' => $value)); array_push($this->stack, array('value' => 'hour')); break; case 'm': case 'minute': case 'minutes': $value = array_pop(array_pop($this->stack)); array_push($this->stack, array('range' => $value)); array_push($this->stack, array('value' => 'minute')); break; case 'month': case 'months': array_push($this->stack, array('value' => 'month')); break; case 'year': case 'years': array_push($this->stack, array('value' => 'year')); break; case 'mon': case 'monday': array_push($this->stack, array('weekday' => 1)); break; case 'tue': case 'tuesday': array_push($this->stack, array('weekday' => 2)); break; case 'wed': case 'wednesday': array_push($this->stack, array('weekday' => 3)); break; case 'thu': case 'thursday': array_push($this->stack, array('weekday' => 4)); break; case 'fri': case 'friday': array_push($this->stack, array('weekday' => 5)); break; case 'sat': case 'saturday': array_push($this->stack, array('weekday' => 6)); break; case 'sun': case 'sunday': array_push($this->stack, array('weekday' => 0)); break; case 'jan': case 'january': array_push($this->stack, array('month' => 1)); break; case 'feb': case 'february': array_push($this->stack, array('month' => 2)); break; case 'mar': case 'march': array_push($this->stack, array('month' => 3)); break; case 'apr': case 'april': array_push($this->stack, array('month' => 4)); break; case 'may': array_push($this->stack, array('month' => 5)); break; case 'jun': case 'june': array_push($this->stack, array('month' => 6)); break; case 'jul': case 'july': array_push($this->stack, array('month' => 7)); break; case 'aug': case 'august': array_push($this->stack, array('month' => 8)); break; case 'sep': case 'september': array_push($this->stack, array('month' => 9)); break; case 'oct': case 'october': array_push($this->stack, array('month' => 10)); break; case 'nov': case 'november': array_push($this->stack, array('month' => 11)); break; case 'dec': case 'december': array_push($this->stack, array('month' => 12)); break; default: break; } }
function findTodosForYear(&$dateObject, $type = '', $pidList = '', $eventType = '4') { $starttime = \TYPO3\CMS\Cal\Controller\Calendar::calculateStartYearTime($dateObject); $endtime = \TYPO3\CMS\Cal\Controller\Calendar::calculateEndYearTime($dateObject); return $this->findAllWithin('cal_event_model', $starttime, $endtime, $type, $this->todoSubtype, $pidList, $eventType); }