• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/uf/fileusertype.php
  • Класс: BitrixDiskUfFileUserType
  • Вызов: FileUserType::getCurrentRelationAttachedFiles
static function getCurrentRelationAttachedFiles($entity, $entityId, $fieldName)
{
	$currentRelations = [];
	$userFieldManager = Driver::getInstance()->getUserFieldManager();
	$attachedObjects = $userFieldManager->getAttachedObjectByEntity($entity, $entityId, $fieldName);
	foreach ($attachedObjects as $attachedObject)
	{
		$currentRelations[$attachedObject->getObjectId()] = $attachedObject->getId();
	}

	return $currentRelations;
}