CBPRestActivity :: __construct: Bitrix method

      
<?php 
//  CBPRestActivity :: __construct()
//  /dist/bitrix/modules/bizproc/classes/general/restactivity.php:34

    
public function __construct($name)
    {
        
parent::__construct($name);

        
$activityData self::getRestActivityData();
        
$this->arProperties = array(
            
'Title' => '',
            
'UseSubscription' => isset($activityData['USE_SUBSCRIPTION']) && $activityData['USE_SUBSCRIPTION'] == 'Y' 'Y' 'N',
            
'IsTimeout' => 0,
            
'AuthUserId' => isset($activityData['AUTH_USER_ID']) ? 'user_'.$activityData['AUTH_USER_ID'] : null,
            
'SetStatusMessage' => 'Y',
            
'StatusMessage' => '',
            
'TimeoutDuration' => 0,
            
'TimeoutDurationType' => 's',
        );

        if (!empty(
$activityData['PROPERTIES']))
        {
            foreach (
$activityData['PROPERTIES'] as $name => $property)
            {
                if (isset(
$this->arProperties[$name]))
                    continue;
                
$this->arProperties[$name] = isset($property['DEFAULT']) ? $property['DEFAULT'] : null;
            }
        }

        
$types = array();
        if (!empty(
$activityData['RETURN_PROPERTIES']))
        {
            foreach (
$activityData['RETURN_PROPERTIES'] as $name => $property)
            {
                if (isset(
$this->arProperties[$name]))
                    continue;
                
$this->arProperties[$name] = isset($property['DEFAULT']) ? $property['DEFAULT'] : null;
                if (isset(
$property['TYPE']))
                    
$types[$name] = array(
                        
'Type' => $property['TYPE'],
                        
'Multiple' => CBPHelper::getBool($property['MULTIPLE']),
                    );
            }
        }
        
$types['IsTimeout'] = array(
            
'Type' => 'int',
        );
        
$this->SetPropertiesTypes($types);
    }