add new feature to donwload a calendar

This commit is contained in:
2022-03-04 17:06:49 +01:00
parent 6c08d2462a
commit 508439e8cf
8 changed files with 45 additions and 28 deletions

View File

@@ -176,6 +176,7 @@ class EmbeddedCalendar extends ComponentBase {
$data += ['wkst' => 2];
}
// Calenders from config
$calendarList = $this->getCalendarsFromProperties();
$dataParams = http_build_query($data);
@@ -220,9 +221,9 @@ class EmbeddedCalendar extends ComponentBase {
$exp_key = explode($this->calPropSeparator, $key);
if($exp_key[0] == 'cal' && $this->property($key) == true){
$calendar = [];
$calendar['src'] = $exp_key[2];
$calendar['color'] = $exp_key[1];
$calendars[] = $calendar;
$calendar['src'] = $exp_key[2];
array_push($calendars, $calendar);
}
}
@@ -230,7 +231,6 @@ class EmbeddedCalendar extends ComponentBase {
}
private function calendarProperties() {
// ToDo: Add cache => https://octobercms.com/docs/services/cache
$service = new GoogleCalendarService();
$calendars = $service->calendarList();