1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс ExternalLocationMap
Граф наследования:ExternalLocationMap:
Location Mapper

Открытые статические члены

static getInternalId ($externalCode)
static getExternalId ($locationId)
static getCityId ($locationId)
static install ()
static unInstall ()
static isInstalled ()
static refresh ()
static importFromCsv ($path)
static exportToCsv ($path)
static getExternalServiceId ()
static setExternalLocation2 ($srvId, $locationId, $xmlId, $updateExist=false)
static setExternalLocation ($srvId, $locationId, $xmlId, $updateExist=false)
static fillNormalizedTable ($startId=false, $timeout=0)
static getLocationIdByNames ($name, $city, $subregion, $region, $country='', $exactOnly=false)

Поля данных

const EXTERNAL_SERVICE_CODE = ''
const CSV_FILE_PATH = ''
const CITY_NAME_IDX = 0
const REGION_NAME_IDX = 1
const CITY_XML_ID_IDX = 2

Защищенные статические члены

static getAllLocations ()
static getUpperCityExternalId ($locationId, $srvId)
static setMap (array $cities)
static isNormalizedTableFilled ()
static getIdByMargin ($parentLeft, $parentRight, $lMargins)
static getNameByMargin ($parentLeft, $parentRight, $lMargins)

Подробное описание

См. определение в файле externallocationmap.php строка 19

Методы

◆ exportToCsv()

exportToCsv ( $path)
static

Export locations map from database to file, csv format.

Аргументы
string$path
Возвращает
bool|int

См. определение в файле externallocationmap.php строка 346

◆ fillNormalizedTable()

fillNormalizedTable ( $startId = false,
$timeout = 0 )
static

Fill table b_sale_hdaln with locations with normalized names

Аргументы
int | bool$startId
int$timeout
Возвращает
int
Исключения

Bitrix\Main\Db\SqlQueryException

См. определение в файле externallocationmap.php строка 580

◆ getAllLocations()

getAllLocations ( )
staticprotected

Abstract. Must return in Result->data all locations from external delivery service.

Возвращает
Result.
Исключения
SystemException

Переопределяется в Location.

См. определение в файле externallocationmap.php строка 35

◆ getCityId()

getCityId ( $locationId)
static

Returns external location city id

Аргументы
int$locationId
Возвращает
int|string

См. определение в файле externallocationmap.php строка 157

◆ getExternalId()

getExternalId ( $locationId)
static

Returns external location id

Аргументы
int$locationId
Возвращает
int|string

См. определение в файле externallocationmap.php строка 73

◆ getExternalServiceId()

getExternalServiceId ( )
static

If exist returns id, if not exist create it

Возвращает
int External service Id
Исключения

Exception

См. определение в файле externallocationmap.php строка 378

◆ getIdByMargin()

getIdByMargin ( $parentLeft,
$parentRight,
$lMargins )
staticprotected

См. определение в файле externallocationmap.php строка 800

◆ getInternalId()

getInternalId ( $externalCode)
static

Returns internal location id

Аргументы
string$externalCode
Возвращает
int

См. определение в файле externallocationmap.php строка 45

◆ getLocationIdByNames()

getLocationIdByNames ( $name,
$city,
$subregion,
$region,
$country = '',
$exactOnly = false )
static
Аргументы
string$nameLocation name.
string$cityCitry name.
string$subregionSubregions name.
string$regionRegion name.
string$countryCountry name.
bool$exactOnlyIf we search exact name, or partly coincidence is enought
Возвращает
int
Исключения

Bitrix\Main\Db\SqlQueryException

Исключения

Exception

См. определение в файле externallocationmap.php строка 650

◆ getNameByMargin()

getNameByMargin ( $parentLeft,
$parentRight,
$lMargins )
staticprotected

См. определение в файле externallocationmap.php строка 813

◆ getUpperCityExternalId()

getUpperCityExternalId ( $locationId,
$srvId )
staticprotected

См. определение в файле externallocationmap.php строка 109

◆ importFromCsv()

importFromCsv ( $path)
static

Import locations map from csv file to database.

Аргументы
string$path
Возвращает
bool|int Quantity of mapped locations.
Исключения

Bitrix\Main\ArgumentException

Исключения

Exception

См. определение в файле externallocationmap.php строка 292

◆ install()

install ( )
static

Install locations map.

Возвращает
Result

См. определение в файле externallocationmap.php строка 194

◆ isInstalled()

isInstalled ( )
static

Check locations map was sat.

Возвращает
bool

См. определение в файле externallocationmap.php строка 233

◆ isNormalizedTableFilled()

isNormalizedTableFilled ( )
staticprotected

См. определение в файле externallocationmap.php строка 561

◆ refresh()

refresh ( )
static

Refresh locations map.

Возвращает
Result
Исключения
ArgumentNullException

См. определение в файле externallocationmap.php строка 259

◆ setExternalLocation()

setExternalLocation ( $srvId,
$locationId,
$xmlId,
$updateExist = false )
static
Аргументы
int$srvId
int$locationId
string$xmlId
bool$updateExist
Возвращает
bool
Исключения
ArgumentNullException

Bitrix\Main\ArgumentException

Исключения

Exception

См. определение в файле externallocationmap.php строка 555

◆ setExternalLocation2()

setExternalLocation2 ( $srvId,
$locationId,
$xmlId,
$updateExist = false )
static
Аргументы
int$srvId
int$locationId
string$xmlId
bool$updateExist
Возвращает
\Bitrix\Main\Entity\AddResult|\Bitrix\Main\Entity\Result|\Bitrix\Main\Entity\UpdateResult
Исключения
ArgumentNullException

Bitrix\Main\ArgumentException

Исключения

Exception

См. определение в файле externallocationmap.php строка 483

◆ setMap()

setMap ( array $cities)
staticprotected

Convert find location by city and region names and add mapping to base

Аргументы
array$cities
Возвращает
Result
Исключения
ArgumentNullException

Bitrix\Main\ArgumentException

Исключения

Exception

Переопределяется в Location.

См. определение в файле externallocationmap.php строка 418

◆ unInstall()

unInstall ( )
static

Uninstall locations map.

Возвращает
Result
Исключения

Exception

См. определение в файле externallocationmap.php строка 214

Поля

◆ CITY_NAME_IDX

const CITY_NAME_IDX = 0

См. определение в файле externallocationmap.php строка 25

◆ CITY_XML_ID_IDX

const CITY_XML_ID_IDX = 2

См. определение в файле externallocationmap.php строка 27

◆ CSV_FILE_PATH

const CSV_FILE_PATH = ''

См. определение в файле externallocationmap.php строка 24

◆ EXTERNAL_SERVICE_CODE

const EXTERNAL_SERVICE_CODE = ''

См. определение в файле externallocationmap.php строка 22

◆ REGION_NAME_IDX

const REGION_NAME_IDX = 1

См. определение в файле externallocationmap.php строка 26


Объявления и описания членов класса находятся в файле: