15 ->setId($objectEO->getId())
16 ->setUserId($objectEO->getObjectId())
17 ->setDateCreate($objectEO->getDateCreate())
18 ->setDateExpire($objectEO->getDateExpire())
19 ->setActive($objectEO->getActive())
20 ->setHash($objectEO->getHash())
21 ->setMembersHash($objectEO->getMembersHash())
22 ->setFrequentUse($objectEO->getFrequentUse())
25 if ($objectEO->getMembers()?->count() > 0)
30 $options = Json::decode($objectEO->getOptions() ??
'');
31 if (!empty($options[
'slotSize']))
33 $sharingUserLink->setSlotSize($options[
'slotSize']);
36 $rule = (
new Rule\Factory())->getRuleBySharingLink($sharingUserLink);
37 $sharingUserLink->setSharingRule($rule);
39 return $sharingUserLink;
47 $baseArray = parent::convertToArray($sharingLink);
49 return array_merge($baseArray, [
50 'userId' => $sharingLink->getUserId(),
51 'slotSize' => $sharingLink->getSlotSize(),