File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/sale/lib/controller/tradeplatform.php
Back
<?php namespace Bitrix\Sale\Controller; use Bitrix\Main\Engine\Response\DataType\Page; use Bitrix\Main\Error; use Bitrix\Main\UI\PageNavigation; use Bitrix\Sale\Result; use Bitrix\Sale\TradingPlatformTable; class TradePlatform extends ControllerBase { public function getFieldsAction(): array { $view = $this->getViewManager() ->getView($this); return ['TRADE_PLATFORM'=>$view->prepareFieldInfos( $view->getFields() )]; } public function listAction($select=[], $filter=[], $order=[], PageNavigation $pageNavigation) { $select = empty($select)? ['*']:$select; $order = empty($order)? ['ID'=>'ASC']:$order; $tradingPlatforms = TradingPlatformTable::getList( [ 'select'=>$select, 'filter'=>$filter, 'order'=>$order, 'offset' => $pageNavigation->getOffset(), 'limit' => $pageNavigation->getLimit() ] )->fetchAll(); return new Page('TRADE_PLATFORMS', $tradingPlatforms, function() use ($filter) { return TradingPlatformTable::getCount($filter); }); } protected function checkReadPermissionEntity(): Result { $r = new Result(); $saleModulePermissions = self::getApplication()->GetGroupRight("sale"); if ($saleModulePermissions == "D") { $r->addError(new Error('Access Denied', 200040300010)); } return $r; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings