• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/basetype/text.php
  • Класс: BitrixBizprocBaseTypeText
  • Вызов: Text::renderControl
static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
{
	$isPublic = ($renderMode & FieldType::RENDER_MODE_PUBLIC);

	if ($allowSelection && !$isPublic)
	{
		return static::renderControlSelector($field, $value, 'combine', '', $fieldType);
	}

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

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

	return sprintf(
		'',
		htmlspecialcharsbx($controlId),
		htmlspecialcharsbx($className),
		htmlspecialcharsbx($fieldType->getDescription()),
		htmlspecialcharsbx($name),
		$selectorAttributes,
		htmlspecialcharsbx((string)$value)
	);
}