set iCal colors in Tine 2.0 containers
[tine20] / tine20 / Calendar / Import / CalDav / Decorator / Abstract.php
1 <?php
2
3 abstract class Calendar_Import_CalDav_Decorator_Abstract
4 {
5     protected $client;
6     
7     public function __construct($client)
8     {
9         $this->client = $client;
10     }
11     
12     public function preparefindAllCalendarsRequest($request)
13     {
14         return $request;
15     }
16     
17     public function processAdditionalCalendarProperties(array &$calendar, array $response) {}
18     
19     public function initCalendarImport() {}
20     
21     public function setCalendarProperties(Tinebase_Model_Container $calendarContainer, array $calendar)
22     {
23         if (isset($calendar['color']) && $calendarContainer->color !== $calendar['color']) {
24             $calendarContainer->color = $calendar['color'];
25             Tinebase_Container::getInstance()->update($calendarContainer);
26         }
27     }
28 }