• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/binding/map.php
  • Класс: BitrixIntranetBindingMap
  • Вызов: Map::mergeInOneDirection
static function mergeInOneDirection(
	self $mergeResult,
	array $sectionsToAdd,
	self $mapThatMayContainDuplicates
): void
{
	foreach ($sectionsToAdd as $section)
	{
		if ($mergeResult->has($section))
		{
			continue;
		}

		$sectionThatWillBeAdded = $section;

		if ($mapThatMayContainDuplicates->has($section))
		{
			$duplicate = $mapThatMayContainDuplicates->findSimilarSection($section);
			if (!is_null($duplicate))
			{
				$sectionThatWillBeAdded = $section->merge($duplicate);
			}
		}

		$mergeResult->add($sectionThatWillBeAdded);
	}
}