This topic contains 0 replies, has 1 voice, and was last updated by zhex900 6 years, 10 months ago.
- Topic
Hi,
I have made changes to Attendee so that it includes Contacts. I use it like this.
$attendee->setContact($contact)
I can get it to work in CalendarEvent. Now I am trying to duplicate the same behaviour in CalendarEvent API. But I cannot get Attendee to save contact relationships.How does CalendarEvent API pass the the selected attendee to CalendarEvent? I cannot find anything meaningfull in
CalendarEventAttendeesApiType
Is there something similar toCalendarEventAttendeesSelectType
?I have added contactId to AttendeeSearchHandler. How do I pass the contactId to form->getData() in CalendarEventAttendeesApiType?
12345678910111213141516171819202122//class AttendeeSearchHandler extends ContextSearchHandler//protected function convertItems(array $items)foreach ($objects as $object) {$attendee = $this->attendeeManager->createAttendee($object);$result[] = ['id' => json_encode(['entityClass' => ClassUtils::getClass($object),'entityId' => $object->getId(),]),'text' => '55555'.$attendee->getDisplayName(),'displayName' => '7777'.$attendee->getDisplayName(),'email' => $attendee->getEmail(),'status' => $attendee->getStatusCode(),'type' => $attendee->getType() ? $attendee->getType()->getId() : null,'userId' => $attendee->getUser() ? $attendee->getUser()->getId() : null,'contactId' => $attendee->getContact() ? $attendee->getContact()->getId() : null];}Do I have to modify ?
12345678910/*** {@inheritdoc}*/public function configureOptions(OptionsResolver $resolver){$resolver->setDefaults(['data_class' => 'Oro\Bundle\CalendarBundle\Entity\Attendee','error_bubbling' => false,]);}
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.