PropertiesDialog :: renderFieldControl: Bitrix method

      
<?php 
//  Bitrix\Bizproc\Activity\PropertiesDialog :: renderFieldControl()
//  /dist/bitrix/modules/bizproc/lib/activity/propertiesdialog.php:367

    
public function renderFieldControl($field$value null$allowSelection true$renderMode FieldType::RENDER_MODE_PUBLIC)
    {
        if (
is_string($field))
        {
            
$field $this->getMap()[$field];
        }

        
$fieldType $field $this->getFieldTypeObject($field) : null;

        if (!
$fieldType)
        {
            return 
'incorrect field type';
        }

        if (
$value === null)
        {
            
$value $this->getCurrentValue($field$field['Default']);
        }

        return 
$fieldType->renderControl(
            [
'Form' => $this->getFormName(), 'Field' => $field['FieldName']],
            
$value,
            
$allowSelection,
            
$renderMode
        
);
    }