• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/entity/address/converter/stringtemplateconverter.php
  • Класс: BitrixLocationEntityAddressConverterStringTemplateConverter
  • Вызов: StringTemplateConverter::appendTextBlock
private function appendTextBlock(array &$blocks, int $position, string $value)
{
	$lastBlock = end($blocks);
	$lastBlockIndex = key($blocks);
	if (is_array($lastBlock) && $lastBlock['type'] === 'text')
	{
		$blocks[$lastBlockIndex]['value'] .= $value;
		$blocks[$lastBlockIndex]['length'] += strlen($value);
	}
	else
	{
		$blocks[] = [
			'type' => 'text',
			'position' => $position,
			'length' => strlen($value),
			'value' => $value,
		];
	}
}