Double :: renderControlMultiple: Bitrix method

      
<?php 
//  Bitrix\Bizproc\BaseType\Double :: renderControlMultiple()
//  /dist/bitrix/modules/bizproc/lib/basetype/double.php:170

    
public static function renderControlMultiple(FieldType $fieldType, array $field$value$allowSelection$renderMode)
    {
        if (!
is_array($value) || is_array($value) && \CBPHelper::isAssociativeArray($value))
            
$value = array($value);

        if (empty(
$value))
            
$value[] = null;

        
$controls = array();

        foreach (
$value as $k => $v)
        {
            
$singleField $field;
            
$singleField['Index'] = $k;
            
$controls[] = static::renderControl(
                
$fieldType,
                
$singleField,
                
$v,
                
$allowSelection,
                
$renderMode
            
);
        }

        if (
$renderMode FieldType::RENDER_MODE_PUBLIC)
        {
            
$renderResult = static::renderPublicMultipleWrapper($fieldType$field$controls);
        }
        else
        {
            
$renderResult = static::wrapCloneableControls($controls, static::generateControlName($field));
        }

        return 
$renderResult;
    }