method public

AddressService::findByLinkedEntity()

Класс: \Bitrix\Location\Service\AddressService

Сигнатура

public findByLinkedEntity(string $entityId, string $entityType) : AddressCollection

Описание

Находит адрес по связанной сущности

Параметры

$entityId string
$entityType string

Возвращаемое значение

AddressCollection

Как применяется в AddressService

AddressService::findByLinkedEntity() — метод класса \Bitrix\Location\Service\AddressService модуля «Местоположения».

Метод объекта: сначала нужен экземпляр AddressService.

use Bitrix\Main\Loader;
use Bitrix\Location\Service\AddressService;

Loader::includeModule('location');

/** @var AddressService $object */
$entityId = '';
$entityType = '';
$result = $object->findByLinkedEntity($entityId, $entityType);
// $result: AddressCollection

Другие методы AddressService

  • delete() Удаляет адрес
  • findById() Находит адрес по addressId.
  • save() Сохраняет адрес

Исходный файл: source/location/lib/service/addressservice.php:61

Что будем искать? Например,Продвижение