CBPWorkflowTemplateLoader :: GetTransfersOfState: Bitrix method

      
<?php 
//  CBPWorkflowTemplateLoader :: GetTransfersOfState()
//  /dist/bitrix/modules/bizproc/classes/general/workflowtemplateloader.php:384

    
public static function GetTransfersOfState($arWorkflowTemplate$stateName)
    {
        if (!
is_array($arWorkflowTemplate))
            throw new 
CBPArgumentTypeException("arWorkflowTemplate""array");

        if (!
is_array($arWorkflowTemplate[0]))
            throw new 
CBPArgumentTypeException("arWorkflowTemplate");

        
$stateName trim($stateName);
        if (
strlen($stateName) <= 0)
            throw new 
CBPArgumentNullException("stateName");

        
$arTransfers = array();
        foreach (
$arWorkflowTemplate[0]["Children"] as $state)
        {
            if (
$stateName == $state["Name"])
            {
                foreach (
$state["Children"] as $event)
                    
$arTransfers[$event["Name"]] = self::FindSetStateActivities($event);

                break;
            }
        }

        return 
$arTransfers;
    }