• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/notification/service.php
  • Класс: BitrixCalendarSharingNotificationService
  • Вызов: Service::getOwner
protected function getOwner(): array
{
	if (is_array($this->owner))
	{
		return $this->owner;
	}

	$ownerId = $this->eventLink->getOwnerId();
	$info = SharingHelper::getOwnerInfo($ownerId);
	$ownerAttendee = current(array_filter($this->getAttendeesList(), static function($att) use ($ownerId) {
		return $att['id'] === $ownerId;
	}));

	if (isset($ownerAttendee['status']) && !in_array($ownerAttendee['status'], ['Q', 'Y', 'N'], true))
	{
		$ownerAttendee['status'] = 'Q';
	}

	$this->owner = [
		'ID' => $ownerId,
		'NAME' => "{$info['name']} {$info['lastName']}",
		'PHOTO' => $info['photo'],
		'GENDER' => $info['gender'],
		'STATUS' => $ownerAttendee['status'] ?? 'Q',
	];

	return $this->owner;
}