method usage fix

This commit is contained in:
Yurii
2026-03-03 18:09:35 +02:00
parent f6a6aefd5e
commit 04794bb2aa
11 changed files with 15 additions and 15 deletions

View File

@@ -280,7 +280,7 @@ class Email implements AssignmentNotificator
->setType(Notification::TYPE_EMAIL_RECEIVED)
->setUserId($userId)
->setData($data)
->setRelated(LinkParent::createFromEntity($entity))
->setRelated(LinkParent::fromEntity($entity))
->setActionId($params->getActionId());
$this->entityManager->saveEntity($notification);

View File

@@ -613,7 +613,7 @@ class DefaultImporter implements Importer
{
foreach ($inlineAttachmentList as $attachment) {
$attachment->setTargetField('body');
$attachment->setRelated(LinkParent::createFromEntity($email));
$attachment->setRelated(LinkParent::fromEntity($email));
$this->entityManager->saveEntity($attachment);
}

View File

@@ -127,7 +127,7 @@ class DefaultAssignmentNotificator implements AssignmentNotificator
'userId' => $this->user->getId(),
'userName' => $this->user->getName(),
])
->setRelated(LinkParent::createFromEntity($entity));
->setRelated(LinkParent::fromEntity($entity));
$this->entityManager->saveEntity($notification);
}

View File

@@ -57,7 +57,7 @@ class DefaultActionLogger implements ActionLogger
->setAuthTokenId($this->user->get('authTokenId'))
->setAuthLogRecordId($this->user->get('authLogRecordId'))
->setIpAddress($this->user->get('ipAddress'))
->setTarget(LinkParent::createFromEntity($entity));
->setTarget(LinkParent::fromEntity($entity));
$this->entityManager->saveEntity($historyRecord);
}

View File

@@ -151,7 +151,7 @@ class Invitations
->setSubject($subject)
->setBody($body)
->setIsHtml()
->setParent(LinkParent::createFromEntity($entity));
->setParent(LinkParent::fromEntity($entity));
$attachmentName = ucwords($this->language->translateLabel($entity->getEntityType(), 'scopeNames')) . '.ics';
@@ -195,7 +195,7 @@ class Invitations
$terminateAt = $dt->format(DateTimeUtil::SYSTEM_DATE_TIME_FORMAT);
}
$uid->setTarget(LinkParent::createFromEntity($entity));
$uid->setTarget(LinkParent::fromEntity($entity));
$uid->setTerminateAt(DateTimeField::fromString($terminateAt));
$this->entityManager->saveEntity($uid);

View File

@@ -114,7 +114,7 @@ class Meeting implements AssignmentNotificator
$notification
->setType(self::NOTIFICATION_TYPE_EVENT_ATTENDEE)
->setUserId($userId)
->setRelated(LinkParent::createFromEntity($entity))
->setRelated(LinkParent::fromEntity($entity))
->setData([
'entityType' => $entity->getEntityType(),
'entityId' => $entity->getId(),

View File

@@ -164,7 +164,7 @@ class PostUsers implements Action
$notification
->setType('EmailInbox')
->setRelated(LinkParent::createFromEntity($email))
->setRelated(LinkParent::fromEntity($email))
->setUserId($user->getId())
->setData([
'emailName' => $email->getSubject(),

View File

@@ -79,7 +79,7 @@ class CollaboratorsNotificator
'relatedName' => $entity->get(Field::NAME),
'createdByName' => $this->user->getName(),
])
->setRelated(LinkParent::createFromEntity($entity))
->setRelated(LinkParent::fromEntity($entity))
->setActionId($params->getActionId());
$this->entityManager->saveEntity($notification);

View File

@@ -61,7 +61,7 @@ class Service
->setType(Notification::TYPE_MENTION_IN_POST)
->setData(['noteId' => $note->getId()])
->setUserId($userId)
->setRelated(LinkParent::createFromEntity($note));
->setRelated(LinkParent::fromEntity($note));
$this->entityManager->saveEntity($notification);
}
@@ -140,7 +140,7 @@ class Service
->setData(['noteId' => $note->getId()])
->setType(Notification::TYPE_NOTE)
->setUserId($user->getId())
->setRelated(LinkParent::createFromEntity($note))
->setRelated(LinkParent::fromEntity($note))
->setRelatedParent(
$note->getParentType() && $note->getParentId() ?
LinkParent::create($note->getParentType(), $note->getParentId()) : null

View File

@@ -587,7 +587,7 @@ class Service
$note = $this->getNewNote();
$note->setType(Note::TYPE_CREATE);
$note->setParent(LinkParent::createFromEntity($entity));
$note->setParent(LinkParent::fromEntity($entity));
$this->setSuperParent($entity, $note, true);
@@ -751,7 +751,7 @@ class Service
$note = $this->getNewNote();
$note->setType(Note::TYPE_ASSIGN);
$note->setParent(LinkParent::createFromEntity($entity));
$note->setParent(LinkParent::fromEntity($entity));
$this->setSuperParent($entity, $note, true);
$this->setAssignData($entity, $note);
@@ -912,7 +912,7 @@ class Service
$note = $this->getNewNote();
$note->setType(Note::TYPE_UPDATE);
$note->setParent(LinkParent::createFromEntity($entity));
$note->setParent(LinkParent::fromEntity($entity));
$note->setData([
'fields' => $updatedFieldList,

View File

@@ -83,7 +83,7 @@ class NotificationService
$notification
->setType(Notification::TYPE_USER_REACTION)
->setUserId($recipientId)
->setRelated(LinkParent::createFromEntity($note));
->setRelated(LinkParent::fromEntity($note));
if ($parent instanceof Entity) {
$notification->setRelatedParent($parent);