• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/basetype/stringtype.php
  • Класс: BitrixBizprocBaseTypeStringType
  • Вызов: StringType::mergeValue
static function mergeValue(FieldType $fieldType, array $baseValue, $appendValue): array
{
	if (CBPHelper::isEmptyValue($baseValue))
	{
		return (array)$appendValue;
	}

	if (!is_array($appendValue))
	{
		$baseValue[] = $appendValue;

		return $baseValue;
	}

	if (!CBPHelper::isAssociativeArray($baseValue) && !CBPHelper::isAssociativeArray($appendValue))
	{
		return array_values(array_merge($baseValue, $appendValue));
	}

	return $baseValue + $appendValue;
}