1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
AverageTemplateDurationToGet.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Lists\Api\Data\ServiceFactory
;
4
5
use
Bitrix\Lists\Api\Data\Data
;
6
use
Bitrix\Lists\Api\Request\ServiceFactory\GetAverageIBlockTemplateDurationRequest
;
7
use
Bitrix\Main\ArgumentException
;
8
use
Bitrix\Main\ArgumentOutOfRangeException
;
9
use
Bitrix\Main\Loader
;
10
11
final
class
AverageTemplateDurationToGet
extends
Data
12
{
13
private
int
$iBlockId;
14
private
int
$autoExecuteType;
15
16
private
function
__construct(
17
int
$iBlockId,
18
int
$autoExecuteType
19
)
20
{
21
$this->iBlockId = $iBlockId;
22
$this->autoExecuteType = $autoExecuteType;
23
}
24
32
public
static
function
createFromRequest
(
$request
): self
33
{
34
$iBlockId =
self::validateId
(
$request
->iBlockId);
35
if
($iBlockId ===
null
|| $iBlockId === 0)
36
{
37
throw
new
ArgumentOutOfRangeException
(
'iBlockId'
, 1,
null
);
38
}
39
40
$autoExecuteType =
$request
->autoExecuteType;
41
if
(!Loader::includeModule(
'bizproc'
) || \
CBPDocumentEventType::out
($autoExecuteType) ===
''
)
42
{
43
throw
new
ArgumentException
(
'Invalid value for $autoExecuteType'
,
'autoExecuteType'
);
44
}
45
46
return
new
self
($iBlockId, $autoExecuteType);
47
}
48
52
public
function
getIBlockId
(): int
53
{
54
return
$this->iBlockId
;
55
}
56
60
public
function
getAutoExecuteType
(): int
61
{
62
return
$this->autoExecuteType;
63
}
64
}
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Lists\Api\Data\Data
Определения
Data.php:6
Bitrix\Lists\Api\Data\Data\validateId
static validateId(int $id)
Определения
Data.php:9
Bitrix\Lists\Api\Data\ServiceFactory\AverageTemplateDurationToGet
Определения
AverageTemplateDurationToGet.php:12
Bitrix\Lists\Api\Data\ServiceFactory\AverageTemplateDurationToGet\createFromRequest
static createFromRequest($request)
Определения
AverageTemplateDurationToGet.php:32
Bitrix\Lists\Api\Data\ServiceFactory\AverageTemplateDurationToGet\getAutoExecuteType
getAutoExecuteType()
Определения
AverageTemplateDurationToGet.php:60
Bitrix\Lists\Api\Data\ServiceFactory\AverageTemplateDurationToGet\getIBlockId
getIBlockId()
Определения
AverageTemplateDurationToGet.php:52
Bitrix\Lists\Api\Request\ServiceFactory\GetAverageIBlockTemplateDurationRequest
Определения
GetAverageIBlockTemplateDurationRequest.php:6
Bitrix\Main\ArgumentException
Определения
ArgumentException.php:9
Bitrix\Main\ArgumentOutOfRangeException
Определения
ArgumentOutOfRangeException.php:9
Bitrix\Main\Loader
Определения
loader.php:13
CBPDocumentEventType\out
static out($v)
Определения
constants.php:161
$iBlockId
$iBlockId
Определения
iblock_subelement_generator.php:45
Bitrix\Lists\Api\Data\ServiceFactory
Определения
AverageTemplateDurationToGet.php:3
bitrix
modules
lists
lib
Api
Data
ServiceFactory
AverageTemplateDurationToGet.php
Создано системой
1.14.0