• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/basetype/double.php
  • Класс: BitrixBizprocBaseTypeDouble
  • Вызов: Double::renderControl
static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
{
	if ($allowSelection && !($renderMode & FieldType::RENDER_MODE_PUBLIC))
	{
		return static::renderControlSelector($field, $value, 'combine', '', $fieldType);
	}

	$name = static::generateControlName($field);
	$controlId = static::generateControlId($field);
	$className = static::generateControlClassName($fieldType, $field);

	if ($renderMode & FieldType::RENDER_MODE_PUBLIC)
	{
		$selectorAttributes = '';
		if ($allowSelection)
		{
			$selectorAttributes = sprintf(
				'data-role="inline-selector-target" data-property="%s" ',
				htmlspecialcharsbx(MainWebJson::encode($fieldType->getProperty()))
			);
		}

		$renderResult = sprintf(
			'',
			htmlspecialcharsbx($className),
			htmlspecialcharsbx($name),
			htmlspecialcharsbx((string)$value),
			htmlspecialcharsbx($fieldType->getDescription()),
			$selectorAttributes
		);
	}
	else
	{
		$renderResult = '';
	}

	return $renderResult;
}