Esempio n. 1
0
 /**
  * @return mixed
  */
 private function getCalendarTimezone()
 {
     if ($this->calendar === null) {
         $this->calendar = $this->service->calendarList->get($this->getCalendarID());
     }
     return $this->calendar->getTimeZone();
 }
Esempio n. 2
0
 /**
  * Insert data from the google object into the model
  *
  * @param \Google_Service_Calendar_CalendarListEntry $calendarItem
  * @param \KevinDitscheid\KdCalendar\Domain\Model\Calendar $calendar
  *
  * @return \KevinDitscheid\KdCalendar\Domain\Model\Calendar
  */
 public static function convert($calendarItem, $calendar = NULL)
 {
     if ($calendar === NULL) {
         $calendar = new \KevinDitscheid\KdCalendar\Domain\Model\Calendar();
     }
     $calendar->setId($calendarItem->getId());
     $calendar->setDescription($calendarItem->getDescription());
     $calendar->setPrimaryCal($calendarItem->getPrimary());
     $calendar->setSummary($calendarItem->getSummary());
     $calendar->setTimeZone($calendarItem->getTimeZone());
     $calendar->setLocation($calendarItem->getLocation());
     return $calendar;
 }