1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
checkexists.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Catalog\Controller;
4
5
use Bitrix\Main\Result;
6
7
trait
CheckExists
8
{
9
abstract
protected
function
getEntityTable();
10
11
protected
function
isExistsRow
(
int
$id): bool
12
{
13
$entityTable = $this->getEntityTable();
14
15
$row = $entityTable::getRow([
16
'select'
=> [
17
'ID'
,
18
],
19
'filter'
=> [
20
'=ID'
=> $id,
21
],
22
]);
23
24
return
!empty($row);
25
}
26
30
protected
function
exists
($id)
31
{
32
$result
=
new
Result
();
33
34
if
(!$this->
isExistsRow
($id))
35
{
36
$result
->addError($this->getErrorEntityNotExists());
37
}
38
39
return
$result
;
40
}
41
}
$result
$result
Определения
get_property_values.php:14
Bitrix\Catalog\Controller\exists
exists($id)
Определения
checkexists.php:30
Bitrix\Catalog\Controller\CheckExists
trait CheckExists
Определения
checkexists.php:8
Bitrix\Catalog\Controller\isExistsRow
isExistsRow(int $id)
Определения
checkexists.php:11
Bitrix\Sale\Discount\Result
Определения
compatibleformat.php:2
bitrix
modules
catalog
lib
controller
checkexists.php
Создано системой
1.14.0