- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/location/migration/migrate.php
- Класс: BitrixSaleLocationMigrationCUpdaterLocationPro
- Вызов: CUpdaterLocationPro::walkTreeInDeep
private function walkTreeInDeep($nodeId, $edges, &$nodes, $margin, $depth = 0)
{
$lMargin = $margin;
if(empty($edges[$nodeId]))
$rMargin = $margin + 1;
else
{
$offset = $margin + 1;
foreach($edges[$nodeId] as $sNode)
$offset = $this->walkTreeInDeep($sNode, $edges, $nodes, $offset, $depth + 1);
$rMargin = $offset;
}
if($nodeId != 'ROOT')
{
// store margins
$this->data['TREE'][$nodeId]['LEFT_MARGIN'] = $lMargin;
$this->data['TREE'][$nodeId]['RIGHT_MARGIN'] = $rMargin;
$this->data['TREE'][$nodeId]['DEPTH_LEVEL'] = $depth;
}
return $rMargin + 1;
}