Esempio n. 1
0
 /**
  * @param IBackend $backend
  * @param ICalendar $calendar
  * @param ICalendar $cachedCalendar
  * @return ICalendar
  */
 protected function resetUnsupportedProperties(IBackend $backend, ICalendar $calendar, ICalendar $cachedCalendar)
 {
     $backendAPI = $backend->getBackendAPI();
     if (!$backendAPI->canStoreColor()) {
         $calendar->setColor($cachedCalendar->getColor());
     }
     if (!$backendAPI->canStoreComponents()) {
         $calendar->setComponents($cachedCalendar->getComponents());
     }
     if (!$backendAPI->canStoreDescription()) {
         $calendar->setDescription($cachedCalendar->getDescription());
     }
     if (!$backendAPI->canStoreDisplayname()) {
         $calendar->setDisplayname($cachedCalendar->getDisplayname());
     }
     if (!$backendAPI->canStoreEnabled()) {
         $calendar->setEnabled($cachedCalendar->getEnabled());
     }
     if (!$backendAPI->canStoreOrder()) {
         $calendar->setOrder($cachedCalendar->getOrder());
     }
     return $calendar;
 }