method
public
LocationService::autocomplete()
Сигнатура
public autocomplete(array<string|int, mixed> $params[, int $searchScope = \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL ]) : array<string|int, mixed>
Параметры
$params
array<string|int, mixed>
$searchScope
int
= \Bitrix\Location\Service\LOCATION_SEARCH_SCOPE_ALL
Возвращаемое значение
array<string|int, mixed>
Как применяется в LocationService
LocationService::autocomplete() — метод класса \Bitrix\Location\Service\LocationService модуля «Местоположения».
Метод объекта: сначала нужен экземпляр LocationService.
use Bitrix\Main\Loader;
use Bitrix\Location\Service\LocationService;
Loader::includeModule('location');
/** @var LocationService $object */
$params = [];
$result = $object->autocomplete($params);
// $result: array<string|int, mixed>Другие методы LocationService
delete()Удаляет местоположениеfindByCoords()Находит местоположение по координатамfindByExternalId()Находит местоположение по externalIdfindById()Находит местоположение по locationIdsave()Сохраняет местоположение
Исходный файл: source/location/lib/service/locationservice.php:118

