• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/bizproctype/sequence.php
  • Класс: BitrixIblockBizprocTypeSequence
  • Вызов: Sequence::renderControl
static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
	{
		$name = static::generateControlName($field);
		$controlId = static::generateControlId($field);
		$className = static::generateControlClassName($fieldType, $field);

		$options = $fieldType->getOptions();

		$iblockId = self::getIblockId($fieldType);
		$propertyId = 0;
		$queryObject = CIBlockProperty::getByID(mb_substr($field["Field"], mb_strlen("PROPERTY_")), $iblockId);
		if ($property = $queryObject->fetch())
		{
			$propertyId = $property["ID"];
		}

		if ($value)
		{
			$value = (int) $value;
		}
		else
		{
			$sequence = new CIBlockSequence($iblockId, $propertyId);
			$value = $sequence->getCurrent();
		}

		$readonly = ((isset($options["write"]) && $options["write"] == "Y") ? "" : "readonly");

		return '';
	}