if ($saleModulePermissions < "W") { $APPLICATION->AuthForm(Loc::getMessage("SALE_ESDL_ACCESS_DENIED")); } /** * @var CDatabase $DB * @var CMain $APPLICATION */ use Bitrix\Main\Localization\Loc; use Bitrix\Sale\Delivery\Services; use Bitrix\Sale\Internals\Input; Loc::loadMessages(__FILE__); $ID = intval($_GET['ID']); $tableId = 'table_delivery_restrictions'; $oSort = new \CAdminSorting($tableId); $lAdmin = new \CAdminList($tableId, $oSort); $restrictionClassNames = Services\Manager::getRestrictionClassNames(); $res = \Bitrix\Sale\Delivery\Restrictions\Table::getList(array('filter' => array('DELIVERY_ID' => $ID), 'select' => array('ID', 'CLASS_NAME', 'SORT', 'PARAMS'), 'order' => array('SORT' => 'ASC', 'ID' => 'DESC'))); $data = $res->fetchAll(); $dbRes = new \CDBResult(); $dbRes->InitFromArray($data); $dbRecords = new \CAdminResult($dbRes, $tableId); $dbRecords->NavStart(); $lAdmin->NavText($dbRecords->GetNavPrint(Loc::getMessage('SALE_RDL_LIST'))); $header = array(array('id' => 'ID', 'content' => Loc::getMessage('SALE_RDL_COL_ID'), "sort" => "", 'default' => true), array('id' => 'SORT', 'content' => Loc::getMessage('SALE_RDL_COL_SORT'), "sort" => "", 'default' => true), array('id' => 'CLASS_NAME', 'content' => Loc::getMessage('SALE_RDL_COL_CLASS_NAME'), "sort" => "", 'default' => true), array('id' => 'PARAMS', 'content' => Loc::getMessage('SALE_RDL_COL_PARAMS'), "sort" => "", 'default' => true)); $lAdmin->AddHeaders($header); $restrictionClassNamesUsed = array(); while ($record = $dbRecords->Fetch()) { if (strlen($record['CLASS_NAME']) > 0) { $restrictionClassNamesUsed[] = $record['CLASS_NAME']; if (is_callable($record['CLASS_NAME'] . '::getClassTitle')) { $className = $record['CLASS_NAME']::getClassTitle();