3namespace Bitrix\Catalog\v2\Integration\UI\EntitySelector;
5use Bitrix\UI\EntitySelector\BaseProvider;
6use Bitrix\UI\EntitySelector\Dialog;
7use Bitrix\UI\EntitySelector\Item;
8use Bitrix\UI\EntitySelector\SearchQuery;
12 private const SECTION_LIMIT = 20;
17 parent::__construct();
24 return $GLOBALS[
'USER']->isAuthorized();
31 $filter = !empty($ids) ? [
'ID' => $ids] : [];
45 $filter = !empty($ids) ? [
'ID' => $ids] : [];
49 $selectedItems[] = $this->
makeItem($section);
52 return $selectedItems;
67 $recentItemsCount =
count($dialog->
getRecentItems()->getEntityItems(static::SECTION_ENTITY_ID));
69 if ($recentItemsCount < self::SECTION_LIMIT)
105 return $this->
getSections(array_merge([
'=ACTIVE' =>
'Y'], $additionalFilter));
112 $filter = $this->getDefaultFilter();
113 if (!empty($additionalFilter))
120 $sectionData = \CIBlockSection::GetList(
124 [
'ID',
'NAME',
'PICTURE'],
126 'nTopCount' => self::SECTION_LIMIT,
129 while ($section = $sectionData->fetch())
131 if (!empty($section[
'PICTURE']))
133 $section[
'PICTURE'] = \CFile::resizeImageGet(
144 $sections[] = $section;
154 'id' => $section[
'ID'],
155 'entityId' => static::SECTION_ENTITY_ID,
156 'title' => $section[
'NAME'],
157 'avatar' => $section[
'PICTURE'],
161 private function getDefaultFilter():
array
__construct(array $options=[])
fillDialog(Dialog $dialog)
getActiveSections(array $additionalFilter=[])
getSections(array $additionalFilter=[])
getSelectedItems(array $ids)
doSearch(SearchQuery $searchQuery, Dialog $dialog)
loadPreselectedItems($preselectedMode=true)
addRecentItem(Item $item)
setCacheable(bool $flag=true)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
const BX_RESIZE_IMAGE_EXACT
$GLOBALS['____1690880296']
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"