CBPWorkflowTemplateLoader :: &FindParentActivityByName: Bitrix method

      
<?php 
//  CBPWorkflowTemplateLoader :: &FindParentActivityByName()
//  /dist/bitrix/modules/bizproc/classes/general/workflowtemplateloader.php:741

    
public static function &FindParentActivityByName(&$arWorkflowTemplate$activityName)
    {
        foreach (
$arWorkflowTemplate as $key => $value)
        {
            if (
is_array($value["Children"]))
            {
                for (
$i 0$s sizeof($value['Children']); $i $s$i++)
                {
                    if (
$value["Children"][$i]["Name"] == $activityName)
                        return 
$arWorkflowTemplate[$key];
                }

                if (
$res = &self::FindParentActivityByName($arWorkflowTemplate[$key]["Children"], $activityName))
                    return 
$res;
            }
        }
        return 
null;
    }