• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/restactivity.php
  • Класс: CBPRestActivity
  • Вызов: CBPRestActivity::renderPropertiesDialog
static function renderPropertiesDialog(BitrixBizprocActivityPropertiesDialog $dialog)
{
	$runtime = CBPRuntime::GetRuntime();
	$data = $dialog->getRuntimeData();
	$activityData = $data['ACTIVITY_DATA'];

	/** @var CBPDocumentService $documentService */
	$documentService = $runtime->GetService("DocumentService");
	$activityDocumentType = is_array($activityData['DOCUMENT_TYPE']) ? $activityData['DOCUMENT_TYPE'] : $dialog->getDocumentType();
	$properties = isset($activityData['PROPERTIES']) && is_array($activityData['PROPERTIES']) ? $activityData['PROPERTIES'] : array();

	$currentValues = $dialog->getCurrentValues();

	$appPlacement = $data['APP_PLACEMENT'];
	$placementSid = null;
	$appCurrentValues = [];

	ob_start();

	if ($appPlacement):

		foreach ($properties as $key => $property)
		{
			$appCurrentValues[$key] = $dialog->getCurrentValue('property_'.mb_strtolower($key));
		}

		global $APPLICATION;
		echo '';
		$placementSid = $APPLICATION->includeComponent(
			'bitrix:app.layout',
			'',
			array(
				'ID' => $appPlacement['APP_ID'],
				'PLACEMENT' => BitrixBizprocRestService::PLACEMENT_ACTIVITY_PROPERTIES_DIALOG,
				'PLACEMENT_ID' => $appPlacement['ID'],
				"PLACEMENT_OPTIONS" => [
					'code' => $activityData['CODE'],
					'activity_name' => $dialog->getActivityName(),
					'properties' => $properties,
					'current_values' => $appCurrentValues,
					'document_type' => $dialog->getDocumentType(),
					'document_fields' => $documentService->GetDocumentFields($dialog->getDocumentType())
				],
				'PARAM' => array(
					'FRAME_WIDTH' => '100%',
					'FRAME_HEIGHT' => '350px'
				),
			),
			null,
			array('HIDE_ICONS' => 'Y')
		);
		echo '';
	else:

	foreach ($properties as $name => $property):
		$required = CBPHelper::getBool($property['REQUIRED']);
		$name = mb_strtolower($name);
		$value = !CBPHelper::isEmptyValue($currentValues[static::PROPERTY_NAME_PREFIX.$name]) ? $currentValues[static::PROPERTY_NAME_PREFIX.$name] : $property['DEFAULT'];

		$property['NAME'] = RestActivityTable::getLocalization($property['NAME'], LANGUAGE_ID);
		if (isset($property['DESCRIPTION']))
		{
			$property['DESCRIPTION'] = RestActivityTable::getLocalization($property['DESCRIPTION'], LANGUAGE_ID);
		}

		?>
		
			
				
					:
				
				
					
getFieldInputControl( $activityDocumentType, $property, array('Field' => static::PROPERTY_NAME_PREFIX.$name, 'Form' => $dialog->getFormName()), $value, true, false )?> : renderFieldControl('AuthUserId', $currentValues['authuserid'], true, 0)?> : : '45'))?> : :
20))?>

* :