1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
dbfieldconverter.php
См. документацию.
1<?php
2
3namespace Bitrix\Location\Entity\Location\Converter;
4
5use Bitrix\Location\Entity;
6use Bitrix\Location\Entity\Address\Normalizer\Builder;
7
14{
22 {
23 $result = [];
24
25 if (($location->getId() > 0))
26 {
27 $result['ID'] = $location->getId();
28 }
29
30 $latitude = $location->getLatitude();
31 $longitude = $location->getLongitude();
32
33 $result['CODE'] = $location->getCode();
34 $result['EXTERNAL_ID'] = $location->getExternalId();
35 $result['SOURCE_CODE'] = $location->getSourceCode();
36 $result['TYPE'] = $location->getType();
37 $result['LATITUDE'] = $latitude === '' ? null : (float)$latitude;
38 $result['LONGITUDE'] = $longitude === '' ? null : (float)$longitude;
39
40 return $result;
41 }
42
50 {
51 $normalizer = Builder::build($location->getLanguageId());
52
53 return [
54 'NAME' => $location->getName(),
55 'LANGUAGE_ID' => $location->getLanguageId(),
56 'LOCATION_ID' => $location->getId(),
57 'NAME_NORMALIZED' => $normalizer->normalize(
58 $location->getName()
59 )
60 ];
61 }
62}
static build(string $lang)
Определения builder.php:18
static convertNameToDbFields(Entity\Location $location)
Определения dbfieldconverter.php:49
static convertToDbFields(Entity\Location $location)
Определения dbfieldconverter.php:21
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
Определения ufield.php:9
$location
Определения options.php:2729