1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
addressconverter.php
См. документацию.
1<?php
2
4
8
15{
23 public static function convertToAddress(Entity\Location $location): Address
24 {
26
27 $result = (new Address($location->getLanguageId()))
28 ->setLatitude($location->getLatitude())
29 ->setLongitude($location->getLongitude())
30 ->setFieldValue($type, $location->getName());
31
32 if($parents = $location->getParents())
33 {
35 foreach ($parents as $parent)
36 {
37 $result->setFieldValue($parent->getType(), $parent->getName());
38 }
39 }
40
41 if($fields = $location->getAllFieldsValues())
42 {
43 foreach($fields as $type => $value)
44 {
45 if(!$result->isFieldExist($type))
46 {
47 $result->setFieldValue($type, $value);
48 }
49 }
50 }
51
52 return $result;
53 }
54}
$type
Определения options.php:106
$result
Определения get_property_values.php:14
Определения ufield.php:9
$location
Определения options.php:2729
$fields
Определения yandex_run.php:501