3namespace Bitrix\Iblock\BizprocType;
5use Bitrix\Bizproc\FieldType;
10 class Sequence
extends UserTypeProperty
12 public static function getType()
14 return FieldType::INT;
25 public static function renderControlSingle(FieldType $fieldType,
array $field, $value, $allowSelection, $renderMode)
27 return self::renderControl($fieldType, $field, $value, $allowSelection, $renderMode);
38 public static function renderControlMultiple(FieldType $fieldType,
array $field, $value, $allowSelection, $renderMode)
41 if (!is_array($value) || is_array($value) && \CBPHelper::isAssociativeArray($value))
46 foreach ($value as $v)
55 foreach ($typeValue as
$k => $v)
57 $singleField = $field;
58 $singleField[
"Index"] =
$k;
59 $controls[] = self::renderControlSingle($fieldType, $singleField, $v, $allowSelection, $renderMode);
62 return static::wrapCloneableControls($controls, static::generateControlName($field));
74 protected static function renderControl(FieldType $fieldType,
array $field, $value, $allowSelection, $renderMode)
76 $name = static::generateControlName($field);
77 $controlId = static::generateControlId($field);
78 $className = static::generateControlClassName($fieldType, $field);
82 $iblockId = self::getIblockId($fieldType);
84 $queryObject = \CIBlockProperty::getByID(mb_substr($field[
"Field"], mb_strlen(
"PROPERTY_")),
$iblockId);
85 if ($property = $queryObject->fetch())
87 $propertyId = $property[
"ID"];
96 $sequence = new \CIBlockSequence(
$iblockId, $propertyId);
97 $value = $sequence->getCurrent();
100 $readonly = ((isset(
$options[
"write"]) &&
$options[
"write"] ==
"Y") ?
"" :
"readonly");
102 return '<input '.htmlspecialcharsbx($readonly).
' type="text" class="'.
107 private static function getIblockId(FieldType $fieldType)
109 $documentType = $fieldType->getDocumentType();
110 $type = explode(
'_', $documentType[2]);
111 return intval(
$type[1]);
static requireModule($moduleName)
static isExpression($text)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)