1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
text.php
См. документацию.
1<?php
2namespace Bitrix\Bizproc\BaseType;
3
4use Bitrix\Bizproc\FieldType;
5use Bitrix\Main;
6
11class Text extends StringType
12{
16 public static function getType()
17 {
18 return FieldType::TEXT;
19 }
20
29 protected static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
30 {
31 $isPublic = ($renderMode & FieldType::RENDER_MODE_PUBLIC);
32
33 if ($allowSelection && !$isPublic)
34 {
35 return static::renderControlSelector($field, $value, 'combine', '', $fieldType);
36 }
37
38 $name = static::generateControlName($field);
39 $controlId = static::generateControlId($field);
40 $className = static::generateControlClassName($fieldType, $field);
41
42 $selectorAttributes = '';
43 if ($isPublic && $allowSelection)
44 {
45 $selectorAttributes = sprintf(
46 'data-role="inline-selector-target" data-property="%s" ',
47 htmlspecialcharsbx(Main\Web\Json::encode($fieldType->getProperty()))
48 );
49 }
50
51 return sprintf(
52 '<textarea id="%s" class="%s" placeholder="%s" rows="5" cols="40" name="%s" %s>%s</textarea>',
53 htmlspecialcharsbx($controlId),
54 htmlspecialcharsbx($className),
57 $selectorAttributes,
58 htmlspecialcharsbx((string)$value)
59 );
60 }
61}
static renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
Определения text.php:29
static getType()
Определения text.php:16
getDescription()
Определения fieldtype.php:295
const TEXT
Определения fieldtype.php:62
const RENDER_MODE_PUBLIC
Определения fieldtype.php:92
getProperty()
Определения fieldtype.php:133
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
$name
Определения menu_edit.php:35
Определения base32.php:2
Определения cookie.php:3