11 ->setId($objectEO->getId())
12 ->setEventId($objectEO->getObjectId())
13 ->setDateCreate($objectEO->getDateCreate())
14 ->setDateExpire($objectEO->getDateExpire())
15 ->setActive($objectEO->getActive())
16 ->setHash($objectEO->getHash())
17 ->setOwnerId($objectEO->getOwnerId())
18 ->setHostId($objectEO->getHostId())
19 ->setConferenceId($objectEO->getConferenceId())
20 ->setParentLinkHash($objectEO->getParentLinkHash())
24 $options = $objectEO->getOptions();
27 $options = Json::decode($options);
29 if (empty($sharingEventLink->getOwnerId()) && !empty($options[
'ownerId']))
31 $sharingEventLink->setOwnerId($options[
'ownerId']);
33 if (empty($sharingEventLink->getHostId()) && !empty($options[
'hostId']))
35 $sharingEventLink->setHostId($options[
'hostId']);
37 if (empty($sharingEventLink->getConferenceId()) && !empty($options[
'conferenceId']))
39 $sharingEventLink->setConferenceId($options[
'conferenceId']);
41 if (empty($sharingEventLink->getParentLinkHash()) && !empty($options[
'userLinkHash']))
43 $sharingEventLink->setParentLinkHash($options[
'userLinkHash']);
45 if (!empty($options[
'canceledTimestamp']))
47 $sharingEventLink->setCanceledTimestamp($options[
'canceledTimestamp']);
50 if (!empty($options[
'externalUserName']))
52 $sharingEventLink->setExternalUserName($options[
'externalUserName']);
55 return $sharingEventLink;
63 $baseArray = parent::convertToArray($sharingLink);
65 return array_merge($baseArray, [
66 'eventId' => $sharingLink->getEventId(),
67 'ownerId' => $sharingLink->getOwnerId(),
68 'hostId' => $sharingLink->getHostId(),
69 'conferenceId' => $sharingLink->getConferenceId(),
70 'parentLinkHash' => $sharingLink->getParentLinkHash(),
71 'canceledTimestamp' => $sharingLink->getCanceledTimestamp(),
72 'externalUserName' => $sharingLink->getExternalUserName(),