SearchUsedActivities: Bitrix method

      
<?php 
//  SearchUsedActivities()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:1029

    
private static function SearchUsedActivities(CBPActivity $activity, &$arUsedActivities)
    {
        
$arT $activity->GetACNames();
        foreach (
$arT as $t)
        {
            if (!
in_array($t$arUsedActivities))
            {
                
$arUsedActivities[] = $t;
            }
        }

        if (
$arNestedActivities $activity->CollectNestedActivities())
        {
            foreach (
$arNestedActivities as $nestedActivity)
            {
                
self::SearchUsedActivities($nestedActivity$arUsedActivities);
            }
        }
    }