Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
tradeplatform.php
1<?php
2
3
5
6
12
14{
15 public function getFieldsAction(): array
16 {
17 $view = $this->getViewManager()
18 ->getView($this);
19
20 return ['TRADE_PLATFORM'=>$view->prepareFieldInfos(
21 $view->getFields()
22 )];
23 }
24
35 public function listAction(PageNavigation $pageNavigation, array $select = [], array $filter = [], array $order = []): Page
36 {
37 $select = empty($select) ? ['*'] : $select;
38 $order = empty($order) ? ['ID'=>'ASC'] : $order;
39
40 $tradingPlatforms = TradingPlatformTable::getList(
41 [
42 'select' => $select,
43 'filter' => $filter,
44 'order' => $order,
45 'offset' => $pageNavigation->getOffset(),
46 'limit' => $pageNavigation->getOffset(),
47 ]
48 )->fetchAll();
49
50 return new Page('TRADE_PLATFORMS', $tradingPlatforms, function() use ($filter)
51 {
52 return TradingPlatformTable::getCount($filter);
53 });
54 }
55
56 protected function checkReadPermissionEntity(): Result
57 {
58 $r = new Result();
59
60 $saleModulePermissions = self::getApplication()->GetGroupRight("sale");
61 if ($saleModulePermissions == "D")
62 {
63 $r->addError(new Error('Access Denied', 200040300010));
64 }
65 return $r;
66 }
67}
listAction(PageNavigation $pageNavigation, array $select=[], array $filter=[], array $order=[])