1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
mapresult.php
См. документацию.
1<?
2namespace Bitrix\Sale\Location\Comparator;
3
4use Bitrix\Sale\Location\LocationTable;
5
10
12{
13 protected $lastProcessedId = 0;
14 protected $supportedCount = 0;
15
16 protected $mapped = array();
17 protected $notFound = array();
18 protected $duplicated = array();
19
20 public function setSupportedCount($count) { $this->supportedCount = intval($count); }
21 public function setLastProcessedId($id) { $this->lastProcessedId = intval($id); }
22 public function getLastProcessedId() { return $this->lastProcessedId; }
23 public function getSupportedCount() { return $this->supportedCount; }
24 public function getDuplicated() { return $this->duplicated; }
25 public function getNotFound() { return $this->notFound; }
26 public function getMapped() { return $this->mapped; }
27
28 public function addNotFound($eLocId, $eLocName)
29 {
30 $this->notFound[] = array($eLocId, $eLocName);
31 }
32
33 public function addDuplicated($eLocId, $eLocName, $bLocId)
34 {
35 $this->duplicated[] = array($eLocId, $eLocName, $bLocId);
36 }
37
38 public function addMapped($eLocId, $eLocName, $bLocId)
39 {
40 $this->mapped[] = array($eLocId, $eLocName, $bLocId, $this->getLocationChain($bLocId));
41 }
42
43 protected function getLocationChain($locationId)
44 {
45 $res = LocationTable::getList(array(
46 'filter' => array(
47 array(
48 'LOGIC' => 'OR',
49 '=CODE' => $locationId,
50 '=ID' => $locationId
51 ),
52 ),
53 'select' => array(
54 'ID', 'CODE', 'LEFT_MARGIN', 'RIGHT_MARGIN'
55 )
56 ));
57
58 if(!$loc = $res->fetch())
59 return '';
60
61 $result = '';
62 $res = LocationTable::getList(array(
63 'filter' => array(
64 '<=LEFT_MARGIN' => $loc['LEFT_MARGIN'],
65 '>=RIGHT_MARGIN' => $loc['RIGHT_MARGIN'],
66 'NAME.LANGUAGE_ID' => 'ru'
67 ),
68 'select' => array(
69 'ID', 'CODE',
70 'LOC_NAME' => 'NAME.NAME'
71 ),
72 'order' => array('LEFT_MARGIN' => 'ASC')
73 ));
74
75 while($loc = $res->fetch())
76 $result .= $loc['LOC_NAME'].', ';
77
78 return $result;
79 }
80}
$count
Определения admin_tab.php:4
addNotFound($eLocId, $eLocName)
Определения mapresult.php:28
getLocationChain($locationId)
Определения mapresult.php:43
addDuplicated($eLocId, $eLocName, $bLocId)
Определения mapresult.php:33
addMapped($eLocId, $eLocName, $bLocId)
Определения mapresult.php:38
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14