3namespace Bitrix\Catalog\v2\Integration\UI\EntitySelector;
5use Bitrix\Catalog\v2\Iblock\IblockInfo;
6use Bitrix\Catalog\v2\IoC\ServiceContainer;
8use Bitrix\UI\EntitySelector\Dialog;
9use Bitrix\UI\EntitySelector\Item;
17 parent::__construct();
18 if (Loader::includeModule(
'crm'))
20 $defaultIblockId = \Bitrix\Crm\Product\Catalog::getDefaultOfferId();
50 $recentItems = $dialog->
getRecentItems()->getEntityItems(self::ENTITY_ID);
55 foreach ($recentItems as $recentItem)
57 $ids[] = $recentItem->getId();
67 foreach ($offers as $offer)
75 if (trim($searchString) ===
'')
81 '*SEARCHABLE_CONTENT' => $searchString,
86 'searchString' => $searchString,
106 foreach ($offers as $offer)
127 $filter = $this->getDefaultFilter();
128 $filter[
'IBLOCK_ID'] = $iblockInfo->getSkuIblockId();
130 $additionalFilter = $parameters[
'filter'];
136 'limit' => self::PRODUCT_LIMIT,
138 $offers = $this->
loadProperties($offers, $iblockInfo->getSkuIblockId(), $iblockInfo);
142 if (isset($parameters[
'searchString']))
144 $offers = $this->
loadBarcodes($offers, $parameters[
'searchString']);
152 return ServiceContainer::getIblockInfo($this->
getIblockId());
155 private function getDefaultFilter():
array
158 'CHECK_PERMISSIONS' =>
'Y',
159 'MIN_PERMISSION' =>
'R',
161 'ACTIVE_DATE' =>
'Y',
loadPrices(array $elements)
loadElements(array $parameters=[])
loadBarcodes(array $elements, string $searchString)
loadProperties(array $elements, int $iblockId, IblockInfo $iblockInfo)
getProducts(array $parameters=[])
__construct(array $options=[])
getProductsBySearchString(string $searchString='')
getSelectedItems(array $ids)
fillDialog(Dialog $dialog)
loadPreselectedItems($preselectedMode=true)
addRecentItem(Item $item)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)