Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ProductVariationProvider.php
1<?php
2
4
6
8{
9 protected const ENTITY_ID = 'agent-contractor-product-variation';
10
11 protected function getProducts(array $parameters = []): array
12 {
13 $iblockInfo = $this->getIblockInfo();
14 if (!$iblockInfo)
15 {
16 return [];
17 }
18
19 $productFilter = (array)($parameters['filter'] ?? []);
20 $additionalProductFilter = [
21 'IBLOCK_ID' => $iblockInfo->getProductIblockId(),
22 ];
23 $filteredTypes = [];
24 if ($this->options['restrictedProductTypes'] !== null)
25 {
26 $filteredTypes = array_intersect(
27 $this->options['restrictedProductTypes'],
29 );
30 }
31 $filteredTypes[] = Catalog\ProductTable::TYPE_EMPTY_SKU;
32 $additionalProductFilter['!=TYPE'] = array_values(array_unique($filteredTypes));
33
34 return $this->loadElements([
35 'filter' => array_merge($productFilter, $additionalProductFilter),
36 'limit' => self::PRODUCT_LIMIT,
37 ]);
38 }
39}
static getProductTypes($descr=false)
Definition product.php:824