1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
inttype.php
См. документацию.
1
<?php
2
namespace
Bitrix\Bizproc\BaseType;
3
4
use Bitrix\Main\Localization\Loc;
5
use Bitrix\Bizproc\FieldType;
6
7
Loc::loadMessages(__FILE__);
8
13
class
IntType
extends
Double
14
{
15
19
public
static
function
getType
()
20
{
21
return
FieldType::INT
;
22
}
23
31
public
static
function
toSingleValue
(
FieldType
$fieldType, $value)
32
{
33
if
(is_array($value))
34
{
35
reset($value);
36
$value = current($value);
37
}
38
return
$value;
39
}
40
47
protected
static
function
extractValue
(
FieldType
$fieldType,
array
$field,
array
$request
)
48
{
49
$value =
Base::extractValue
($fieldType, $field,
$request
);
50
51
if
($value !==
null
&& is_string($value) && $value <>
''
)
52
{
53
if
(\
CBPActivity::isExpression
($value))
54
return
$value;
55
56
$value = str_replace(
' '
,
''
, $value);
57
if
(preg_match(
'#^[0-9\-]+$#'
, $value))
58
{
59
$value = (int) $value;
60
}
61
else
62
{
63
$value =
null
;
64
static::addError(
array
(
65
'code'
=>
'ErrorValue'
,
66
'message'
=> Loc::getMessage(
'BPDT_INT_INVALID'
),
67
'parameter'
=> static::generateControlName($field),
68
));
69
}
70
}
71
elseif
(is_numeric($value))
72
{
73
$value = (int)$value;
74
}
75
else
76
{
77
$value =
null
;
78
}
79
80
return
$value;
81
}
82
}
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Bizproc\BaseType\Base\extractValue
static extractValue(FieldType $fieldType, array $field, array $request)
Определения
base.php:645
Bitrix\Bizproc\BaseType\Double
Определения
double.php:15
Bitrix\Bizproc\BaseType\IntType
Определения
inttype.php:14
Bitrix\Bizproc\BaseType\IntType\getType
static getType()
Определения
inttype.php:19
Bitrix\Bizproc\BaseType\IntType\extractValue
static extractValue(FieldType $fieldType, array $field, array $request)
Определения
inttype.php:47
Bitrix\Bizproc\BaseType\IntType\toSingleValue
static toSingleValue(FieldType $fieldType, $value)
Определения
inttype.php:31
Bitrix\Bizproc\FieldType
Определения
fieldtype.php:12
Bitrix\Bizproc\FieldType\INT
const INT
Определения
fieldtype.php:42
CBPActivity\isExpression
static isExpression($text)
Определения
activity.php:1718
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
bitrix
modules
bizproc
lib
basetype
inttype.php
Создано системой
1.14.0