コード例 #1
0
ファイル: OrganizerTest.php プロジェクト: reinvented/levees
 /**
  * @param Organizer $vOrganizer
  * @return \Eluceo\iCal\Component\Calendar
  */
 private function createCalendarWithOrganizer(\Eluceo\iCal\Property\Event\Organizer $vOrganizer)
 {
     $vCalendar = new \Eluceo\iCal\Component\Calendar('www.example.com');
     $vEvent = new \Eluceo\iCal\Component\Event('123456');
     $vEvent->setOrganizer($vOrganizer);
     $vCalendar->addComponent($vEvent);
     return $vCalendar;
 }
コード例 #2
-1
 /**
  * _getCalendarEvent
  * @param Cake\Entity $entity passed
  * @param array $options with extra settings
  * @return \Eluceo\iCal\Component\Event $vEvent
  */
 protected function _getCalendarEvent($entity, $options = [])
 {
     $vEvent = new \Eluceo\iCal\Component\Event();
     $vOrganizer = new \Eluceo\iCal\Property\Event\Organizer($options['organizer'], ['MAILTO' => $options['organizer']]);
     $vEvent->setOrganizer($vOrganizer);
     $vEvent->setSummary($options['subject']);
     if ($entity->description) {
         $vEvent->setDescription($entity->description);
     }
     $dates = $this->_getEventTime($entity, $options);
     $vEvent->setDtStart($dates['start']);
     $vEvent->setDtEnd($dates['end']);
     if ($entity->location) {
         $vEvent->setLocation($entity->location, "Location:");
     }
     return $vEvent;
 }