Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
ProductRepository.php
1
<?php
2
3
namespace
Bitrix\Catalog\v2\Product
;
4
5
use
Bitrix\Catalog\ProductTable
;
6
use
Bitrix\Catalog\v2\BaseIblockElementEntity
;
7
use
Bitrix\Catalog\v2\BaseIblockElementRepository
;
8
use
Bitrix\Catalog\v2\Iblock\IblockInfo
;
9
18
class
ProductRepository
extends
BaseIblockElementRepository
implements
ProductRepositoryContract
19
{
21
protected
$factory
;
22
29
public
function
__construct
(
ProductFactory
$factory
,
IblockInfo
$iblockInfo
)
30
{
31
parent::__construct(
$factory
,
$iblockInfo
);
32
}
33
34
protected
function
getAdditionalFilter
(): array
35
{
36
$filter = parent::getAdditionalFilter();
37
$filter[
'IBLOCK_ID'
] = $this->iblockInfo->getProductIblockId();
38
39
return
$filter;
40
}
41
42
protected
function
getAdditionalProductFilter
(): array
43
{
44
$filter = parent::getAdditionalProductFilter();
45
46
$filter[
'=TYPE'
] = [
47
ProductTable::TYPE_PRODUCT
,
48
ProductTable::TYPE_SKU
,
49
ProductTable::TYPE_EMPTY_SKU
,
50
ProductTable::TYPE_SERVICE
,
51
];
52
53
return
$filter;
54
}
55
56
protected
function
makeEntity
(array $fields = []):
BaseIblockElementEntity
57
{
58
return
$this->factory->createEntity();
59
}
60
}
Bitrix\Catalog\ProductTable
Definition
product.php:63
Bitrix\Catalog\ProductTable\TYPE_EMPTY_SKU
const TYPE_EMPTY_SKU
Definition
product.php:75
Bitrix\Catalog\ProductTable\TYPE_SKU
const TYPE_SKU
Definition
product.php:72
Bitrix\Catalog\ProductTable\TYPE_SERVICE
const TYPE_SERVICE
Definition
product.php:76
Bitrix\Catalog\ProductTable\TYPE_PRODUCT
const TYPE_PRODUCT
Definition
product.php:70
Bitrix\Catalog\v2\BaseIblockElementEntity
Definition
BaseIblockElementEntity.php:27
Bitrix\Catalog\v2\BaseIblockElementRepository
Definition
BaseIblockElementRepository.php:22
Bitrix\Catalog\v2\BaseIblockElementRepository\$iblockInfo
$iblockInfo
Definition
BaseIblockElementRepository.php:26
Bitrix\Catalog\v2\Iblock\IblockInfo
Definition
IblockInfo.php:17
Bitrix\Catalog\v2\Product\ProductFactory
Definition
ProductFactory.php:18
Bitrix\Catalog\v2\Product\ProductRepository
Definition
ProductRepository.php:19
Bitrix\Catalog\v2\Product\ProductRepository\$factory
$factory
Definition
ProductRepository.php:21
Bitrix\Catalog\v2\Product\ProductRepository\__construct
__construct(ProductFactory $factory, IblockInfo $iblockInfo)
Definition
ProductRepository.php:29
Bitrix\Catalog\v2\Product\ProductRepository\getAdditionalProductFilter
getAdditionalProductFilter()
Definition
ProductRepository.php:42
Bitrix\Catalog\v2\Product\ProductRepository\getAdditionalFilter
getAdditionalFilter()
Definition
ProductRepository.php:34
Bitrix\Catalog\v2\Product\ProductRepository\makeEntity
makeEntity(array $fields=[])
Definition
ProductRepository.php:56
Bitrix\Catalog\v2\Product\ProductRepositoryContract
Definition
ProductRepositoryContract.php:16
Bitrix\Catalog\v2\Product
Definition
BaseProduct.php:3
modules
catalog
lib
v2
Product
ProductRepository.php
Создано системой
1.10.0