Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
StoreViewRule.php
1<?php
2
4
6use \Bitrix\Catalog\Access\Permission\PermissionDictionary;
7
9{
10 protected function loadAvailableValues(): array
11 {
12 return array_column(PermissionDictionary::getStoreVariables(), 'id');
13 }
14
15 protected function check($params): bool
16 {
17 $item = $params['item'] ?? null;
18 if ($item instanceof StoreDocumentElement)
19 {
20 $params['value'] = $item->getStoreIds();
21 }
22
23 return parent::check($params);
24 }
25}