CBPDocumentService::getTypesConversionMap: Bitrix method

      
<?php 
//  CBPDocumentService :: getTypesConversionMap()
//  /dist/bitrix/modules/bizproc/classes/general/documentservice.php:956

    
public function getTypesConversionMap(array $parameterDocumentType)
    {
        
$typesMap $this->getTypesMap($parameterDocumentType);
        
$typesConversionMap = array();

        
/** @var \Bitrix\Bizproc\BaseType\Base $typeClass */
        
foreach ($typesMap as $documentTypeName => $typeClass)
        {
            if (!isset(
$typesConversionMap[$documentTypeName]))
                
$typesConversionMap[$documentTypeName] = array();

            
$typeMap $typeClass::getConversionMap();
            if (!empty(
$typeMap[0]))
            {
                
$typesConversionMap[$documentTypeName] = array_merge($typesConversionMap[$documentTypeName], $typeMap[0]);
            }

            if (!empty(
$typeMap[1]))
            {
                foreach (
$typeMap[1] as $from)
                {
                    if (!isset(
$typesConversionMap[$from]))
                        
$typesConversionMap[$from] = array();

                    
$typesConversionMap[$from][] = $documentTypeName;
                }
            }
        }

        return 
$typesConversionMap;
    }