Example #1
0
 /**
  * @param IUser $user
  */
 public function runForUser($user)
 {
     $principal = 'principals/users/' . $user->getUID();
     $calendars = $this->calDavBackend->getCalendarsForUser($principal);
     foreach ($calendars as $calendar) {
         $objects = $this->calDavBackend->getCalendarObjects($calendar['id']);
         foreach ($objects as $object) {
             $calObject = $this->calDavBackend->getCalendarObject($calendar['id'], $object['uri']);
             $classification = $this->extractClassification($calObject['calendardata']);
             $this->calDavBackend->setClassification($object['id'], $classification);
         }
     }
 }