1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
iblocktype.php
См. документацию.
1
<?
2
namespace
Bitrix\Lists\Entity;
3
4
use Bitrix\Lists\Service\Param;
5
use Bitrix\Main\Errorable;
6
use Bitrix\Main\ErrorableImplementation;
7
use Bitrix\Main\ErrorCollection;
8
9
class
IblockType
implements
Errorable
10
{
11
use
ErrorableImplementation
;
12
13
private
$param;
14
private
$params = [];
15
16
public
function
__construct
(
Param
$param)
17
{
18
$this->param = $param;
19
$this->params = $param->getParams();
20
21
$this->errorCollection =
new
ErrorCollection
;
22
}
23
29
public
function
getIblockTypeId
()
30
{
31
$this->param->checkRequiredInputParams([
"IBLOCK_CODE"
,
"IBLOCK_ID"
]);
32
if
($this->param->hasErrors())
33
{
34
$this->errorCollection->add($this->param->getErrors());
35
return
null
;
36
}
37
38
$filter
= [
"CHECK_PERMISSIONS"
=>
"Y"
];
39
40
if
(empty($this->params[
"IBLOCK_ID"
]))
41
{
42
$filter
[
"=CODE"
] = $this->params[
"IBLOCK_CODE"
];
43
}
44
if
(empty($this->params[
"IBLOCK_CODE"
]))
45
{
46
$filter
[
"=ID"
] = $this->params[
"IBLOCK_ID"
];
47
}
48
49
$queryObject = \CIBlock::getList([],
$filter
);
50
if
(
$iblock
= $queryObject->fetch())
51
{
52
return
(
$iblock
[
"IBLOCK_TYPE_ID"
] ?
$iblock
[
"IBLOCK_TYPE_ID"
] :
null
);
53
}
54
else
55
{
56
return
null
;
57
}
58
}
59
}
Bitrix\Lists\Entity\IblockType
Определения
iblocktype.php:10
Bitrix\Lists\Entity\IblockType\getIblockTypeId
getIblockTypeId()
Определения
iblocktype.php:29
Bitrix\Lists\Entity\IblockType\__construct
__construct(Param $param)
Определения
iblocktype.php:16
Bitrix\Lists\Service\Param
Определения
param.php:10
Bitrix\Main\ErrorCollection
Определения
errorcollection.php:14
$iblock
if(! $catalogEdit->isSuccess()) $iblock
Определения
iblock_catalog_edit.php:38
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Main\Errorable
Определения
errorable.php:6
Bitrix\Main\ErrorableImplementation
trait ErrorableImplementation
Определения
errorableimplementation.php:8
bitrix
modules
lists
lib
entity
iblocktype.php
Создано системой
1.14.0