当前位置: 首页>>代码示例>>PHP>>正文


PHP CDBResult::GetNavParams方法代码示例

本文整理汇总了PHP中CDBResult::GetNavParams方法的典型用法代码示例。如果您正苦于以下问题:PHP CDBResult::GetNavParams方法的具体用法?PHP CDBResult::GetNavParams怎么用?PHP CDBResult::GetNavParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDBResult的用法示例。


在下文中一共展示了CDBResult::GetNavParams方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setNavStartParams

 protected function setNavStartParams()
 {
     if ($this->arParams['PAGER_SAVE_SESSION'] !== 'Y') {
         \CPageOption::SetOptionString('main', 'nav_page_in_session', 'N');
     }
     $this->arParams['PAGER_DESC_NUMBERING'] = $this->arParams['PAGER_DESC_NUMBERING'] === 'Y';
     if ($this->arParams['DISPLAY_BOTTOM_PAGER'] === 'Y' || $this->arParams['DISPLAY_TOP_PAGER'] === 'Y') {
         $this->navStartParams = ['nPageSize' => $this->arParams['ELEMENTS_COUNT'], 'bDescPageNumbering' => $this->arParams['PAGER_DESC_NUMBERING'], 'bShowAll' => $this->arParams['PAGER_SHOW_ALL']];
         $this->addCacheAdditionalId(\CDBResult::GetNavParams($this->navStartParams));
     } elseif ($this->arParams['ELEMENTS_COUNT'] > 0) {
         $this->navStartParams = ['nTopCount' => $this->arParams['ELEMENTS_COUNT'], 'bDescPageNumbering' => $this->arParams['PAGER_DESC_NUMBERING']];
     } else {
         $this->navStartParams = false;
     }
 }
开发者ID:lithium-li,项目名称:bbc-module,代码行数:15,代码来源:elements.php

示例2: executeComponent

    /**
     * Если не знаешь что за метод, дальше не смотри
     */
    public function executeComponent() 
    {
        if (false === $this->Initialize()) {
            return false;
        }

        $arNavigation = CDBResult::GetNavParams($arNavParams);

        global $USER;
        $cache = $this->navParams . $arNavigation . bitrix_sessid_get() . $USER->GetID();
        
        if ($this->startResultCache(0, $cache)) {
            $this->arResult["items"] = $this->GetItems($arNavParams);
            $this->includeComponentTemplate();
        }
    }
开发者ID:ASDAFF,项目名称:stex,代码行数:19,代码来源:class.php

示例3: array

}
$propertyOrder = array();
if ($by == 'PROPERTY_TYPE') {
    $propertyOrder = array('PROPERTY_TYPE' => $order, 'USER_TYPE' => $order);
} else {
    $propertyOrder = array(strtoupper($by) => strtoupper($order));
}
if (!isset($propertyOrder['ID'])) {
    $propertyOrder['ID'] = 'ASC';
}
$usePageNavigation = true;
$navyParams = array();
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'excel') {
    $usePageNavigation = false;
} else {
    $navyParams = CDBResult::GetNavParams(CAdminResult::GetNavSize($sTableID));
    if ($navyParams['SHOW_ALL']) {
        $usePageNavigation = false;
    } else {
        $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
        $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
    }
}
if ($selectFields['PROPERTY_TYPE']) {
    $selectFields['USER_TYPE'] = true;
}
$selectFields = array_keys($selectFields);
$getListParams = array('select' => $selectFields, 'filter' => $arFilter, 'order' => $propertyOrder);
if ($usePageNavigation) {
    $getListParams['limit'] = $navyParams['SIZEN'];
    $getListParams['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_property_admin.php

示例4: NavStringForCache

 /**
  * <p>Возвращает уникальную строку идентифицирующую текущее состояние постраничной навигации (номер текущей страницы, нажата ли ссылка "Все"). Результат данного метода применяется как правило для составления идентификатора кэша, который в свою очередь используется в методах классов <a href="http://dev.1c-bitrix.ru/api_help/main/reference/cpagecache/index.php">CPageCache</a> и <a href="http://dev.1c-bitrix.ru/api_help/main/reference/cphpcache/index.php">CPHPCache</a>. Динамичный метод.</p>
  *
  *
  * @param int $page_size = 10 Размер страницы постраничной навигации (от 1 и более).
  * Необязательный. По умолчанию 10.
  *
  * @param bool $show_all = true Разрешить ли показывать все записи (и выводить ссылку "Все" в
  * навигации).<br>Необязательный. По умолчанию - "true".
  *
  * @param int $NumPage = false Принудительно ли открывать страницу с этим номером (в
  * независимости от параметров в URL).<br>Необязательный. По умолчанию -
  * "false" (открывать страницу в зависимости от параметров в URL).
  *
  * @return string 
  *
  * <h4>Example</h4> 
  * <pre>
  * &lt;?
  * // создаем объект
  * $obCache = new CPageCache; 
  * 
  * // время кэширования - 30 минут
  * $life_time = 30*60; 
  * 
  * // получим строку идентифицирующую состояние постраничной навигации
  * $nav = <b>CDBResult::NavStringForCache</b>($PAGE_ELEMENT_COUNT);
  * 
  * // формируем идентификатор кэша в зависимости от всех параметров 
  * // которые могут повлиять на результирующий HTML
  * $cache_id = $nav.$ELEMENT_ID.$IBLOCK_TYPE.$USER-&gt;GetUserGroupString(); 
  * 
  * // инициализируем буферизирование вывода
  * if($obCache-&gt;StartDataCache($life_time, $cache_id, "/")):
  * 
  * 	// получаем список элементов
  * 	if ($rsElements = GetIBlockElementList($IBLOCK_ID, $SECTION_ID)):
  * 
  * 		// инициализируем постраничную навигацию
  * 		$rsElements-&gt;NavStart($PAGE_ELEMENT_COUNT);
  * 
  * 		// выведем постраничную навигацию
  * 		echo $rsElements-&gt;NavPrint($ELEMENT_NAME);
  * 
  * 		// пройдемся по элементам
  * 		while ($obElement = $rsElements-&gt;GetNextElement()):
  * 
  * 			$arElement = $obElement-&gt;GetFields();
  * 			$arProperty = $obElement-&gt;GetProperties();		
  * 
  * 			echo "&lt;pre&gt;"; print_r($arElement); echo "&lt;/pre&gt;";
  * 			echo "&lt;pre&gt;"; print_r($arProperty); echo "&lt;/pre&gt;";
  * 
  * 		endwhile;
  * 	endif;
  * 
  * 	// записываем буферизированный результат на диск в файл кэша
  * 	$obCache-&gt;EndDataCache(); 
  * endif;
  * ?&gt;
  * </pre>
  *
  *
  * <h4>See Also</h4> 
  * <ul> <li> <a href="http://dev.1c-bitrix.ru/api_help/main/reference/cpagecache/index.php">Класс CPageCache</a> </li>
  * <li> <a href="http://dev.1c-bitrix.ru/api_help/main/reference/cphpcache/index.php">Класс CPHPCache</a> </li>
  * </ul><a name="examples"></a>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/main/reference/cdbresult/navstringforcache.php
  * @author Bitrix
  */
 public static function NavStringForCache($nPageSize = 0, $bShowAll = true, $iNumPage = false)
 {
     $NavParams = CDBResult::GetNavParams($nPageSize, $bShowAll, $iNumPage);
     return "|" . ($NavParams["SHOW_ALL"] ? "" : $NavParams["PAGEN"]) . "|" . $NavParams["SHOW_ALL"] . "|";
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:78,代码来源:database.php

示例5: array_fill_keys

$selectFieldsMap = array_fill_keys(array_keys($headerList), false);
$selectFieldsMap = array_merge($selectFieldsMap, $selectFields);
$userList = array();
$userIDs = array();
$nameFormat = CSite::GetNameFormat(true);
$rowList = array();
$couponTypeList = array();
if ($selectFieldsMap['TYPE']) {
    $couponTypeList = Internals\DiscountCouponTable::getCouponTypes(true);
}
$usePageNavigation = true;
$navyParams = array();
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'excel') {
    $usePageNavigation = false;
} else {
    $navyParams = CDBResult::GetNavParams(CAdminResult::GetNavSize($adminListTableID, array('nPageSize' => 20, 'sNavID' => $adminList->GetListUrl(true))));
    if ($navyParams['SHOW_ALL']) {
        $usePageNavigation = false;
    } else {
        $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
        $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
    }
}
if ($selectFields['TYPE']) {
    $selectFields['USE_COUNT'] = true;
}
$selectFields = array_keys($selectFields);
$getListParams = array('select' => $selectFields, 'filter' => $filter, 'order' => array($by => $order));
if ($usePageNavigation) {
    $countQuery = new Main\Entity\Query(Internals\DiscountCouponTable::getEntity());
    $countQuery->addSelect(new Main\Entity\ExpressionField('CNT', 'COUNT(1)'));
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:discount_coupon_list.php

示例6: array

            case "delete":
                $entity_data_class::delete($ID);
                break;
        }
    }
}
$arr = array('delete' => true);
$lAdmin->AddGroupActionTable($arr);
// select data
/** @var string $order */
$order = strtoupper($order);
$usePageNavigation = true;
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'excel') {
    $usePageNavigation = false;
} else {
    $navyParams = CDBResult::GetNavParams(CAdminResult::GetNavSize($sTableID, array('nPageSize' => 20, 'sNavID' => $APPLICATION->GetCurPage() . '?ENTITY_ID=' . $ENTITY_ID)));
    if ($navyParams['SHOW_ALL']) {
        $usePageNavigation = false;
    } else {
        $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
        $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
    }
}
$getListParams = array('select' => $lAdmin->GetVisibleHeaderColumns(), 'filter' => $filterValues, 'order' => array($by => $order));
unset($filterValues);
if ($usePageNavigation) {
    $getListParams['limit'] = $navyParams['SIZEN'];
    $getListParams['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
}
if ($usePageNavigation) {
    $countQuery = new Query($entity_data_class::getEntity());
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:highloadblock_rows_list.php

示例7: array

         // for grc filter
         $grcDataPrimaryValues['=' . $def][] = $row[$alias];
         // for concat
         $grc_primary_string .= (string) $row[$alias] . '/';
     }
     // save original data indexes for grc values
     if (!isset($grcDataPrimaryPointers[$grc_primary_string])) {
         $grcDataPrimaryPointers[$grc_primary_string] = array();
     }
     $grcDataPrimaryPointers[$grc_primary_string][] = count($data) - 1;
 }
 $grcDataPrimaryValues = array_map('array_unique', $grcDataPrimaryValues);
 // </editor-fold>
 if (empty($settings['limit'])) {
     $arResult["NAV_STRING"] = $result->GetPageNavString('', is_set($arParams['NAV_TEMPLATE']) ? $arParams['NAV_TEMPLATE'] : 'arrows');
     $arResult["NAV_PARAMS"] = $result->GetNavParams();
     $arResult["NAV_NUM"] = $result->NavNum;
 }
 // <editor-fold defaultstate="collapsed" desc="retrieve total counts">
 $totalSelect = $select;
 $totalColumns = array();
 foreach ($viewColumns as $num => $view) {
     // total's fields are the same as percentable fields
     // they are also all numerics
     if (CReport::isColumnTotalCountable($view, $arParams['REPORT_HELPER_CLASS'])) {
         // exclude from select all except those
         $totalColumns[$view['resultName']] = true;
     }
 }
 // save only totalCountable visible fields
 foreach ($totalSelect as $k => $v) {
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例8: array

                    if ($result->isSuccess()) {
                        Application::getConnection()->commitTransaction();
                    } else {
                        $lAdmin->AddGroupError(implode('\\n', $result->getErrorMessages()));
                    }
                }
                break;
        }
    }
}
$headers = array(array("id" => "DATE_PAID", "content" => GetMessage("SALE_ORDER_DATE_PAID"), "sort" => "DATE_PAID", "default" => true), array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "ORDER_ID", "content" => GetMessage("SALE_ORDER_ID"), "sort" => "ORDER_ID", "default" => true), array("id" => "ACCOUNT_NUMBER", "content" => GetMessage("SALE_ACCOUNT_NUMBER"), "sort" => "ORDER.ACCOUNT_NUMBER", "default" => false), array("id" => "ORDER_USER_NAME", "content" => GetMessage("SALE_ORDER_USER_NAME"), "sort" => "ORDER_USER_NAME", "default" => true), array("id" => "PAID", "content" => GetMessage("SALE_ORDER_PAID"), "sort" => "PAID", "default" => true), array("id" => "PAY_SYSTEM_NAME", "content" => GetMessage("SALE_ORDER_PAY_SYSTEM_NAME"), "sort" => "PAY_SYSTEM_NAME", "default" => true), array("id" => "SUM", "content" => GetMessage("SALE_ORDER_SUM"), "sort" => "SUM", "default" => true), array("id" => "COMPANY_BY", "content" => GetMessage("SALE_ORDER_COMPANY_BY"), "sort" => "COMPANY_BY.NAME", "default" => true), array("id" => "PAY_VOUCHER_NUM", "content" => GetMessage("SALE_ORDER_PAY_VOUCHER_NUM"), "sort" => "PAY_VOUCHER_NUM", "default" => true), array("id" => "RESPONSIBLE_BY", "content" => GetMessage("SALE_ORDER_RESPONSIBLE_BY"), "sort" => "", "default" => true), array("id" => "PS_STATUS", "content" => GetMessage("SALE_ORDER_PS_STATUS"), "sort" => "PS_STATUS", "default" => false), array("id" => "PS_STATUS_CODE", "content" => GetMessage("SALE_ORDER_PS_STATUS_CODE"), "sort" => "PS_STATUS_CODE", "default" => false), array("id" => "PS_STATUS_DESCRIPTION", "content" => GetMessage("SALE_ORDER_PS_STATUS_DESCRIPTION"), "sort" => "PS_STATUS_DESCRIPTION", "default" => false), array("id" => "PS_STATUS_MESSAGE", "content" => GetMessage("SALE_ORDER_PS_STATUS_MESSAGE"), "sort" => "PS_STATUS_MESSAGE", "default" => false), array("id" => "PS_SUM", "content" => GetMessage("SALE_ORDER_PS_SUM"), "sort" => "PS_SUM", "default" => false), array("id" => "PS_CURRENCY", "content" => GetMessage("SALE_ORDER_PS_CURRENCY"), "sort" => "PS_CURRENCY", "default" => false), array("id" => "PS_RESPONSE_DATE", "content" => GetMessage("SALE_ORDER_PS_RESPONSE_DATE"), "sort" => "PS_RESPONSE_DATE", "default" => false), array("id" => "PAY_VOUCHER_DATE", "content" => GetMessage("SALE_ORDER_PAY_VOUCHER_DATE"), "sort" => "PAY_VOUCHER_DATE", "default" => false), array("id" => "DATE_PAY_BEFORE", "content" => GetMessage("SALE_ORDER_DATE_PAY_BEFORE"), "sort" => "DATE_PAY_BEFORE", "default" => false), array("id" => "DATE_BILL", "content" => GetMessage("SALE_ORDER_DATE_BILL"), "sort" => "DATE_BILL", "default" => false), array("id" => "PAY_SYSTEM_NAME", "content" => GetMessage("SALE_ORDER_PAY_SYSTEM_NAME"), "sort" => "PAY_SYSTEM_NAME", "default" => false));
$select = array('*', 'COMPANY_BY_NAME' => 'COMPANY_BY.NAME', 'RESPONSIBLE_BY_NAME' => 'RESPONSIBLE_BY.NAME', 'RESPONSIBLE_BY_LAST_NAME' => 'RESPONSIBLE_BY.LAST_NAME', 'ORDER_ACCOUNT_NUMBER' => 'ORDER.ACCOUNT_NUMBER', 'ORDER_USER_NAME' => 'ORDER.USER.NAME', 'ORDER_USER_LAST_NAME' => 'ORDER.USER.LAST_NAME', 'ORDER_USER_ID' => 'ORDER.USER_ID');
$params = array('select' => $select, 'filter' => $arFilter, 'order' => array($by => $order));
$usePageNavigation = true;
$navyParams = array();
$navyParams = CDBResult::GetNavParams(CAdminResult::GetNavSize($tableId));
if ($navyParams['SHOW_ALL']) {
    $usePageNavigation = false;
} else {
    $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
    $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
}
if ($usePageNavigation) {
    $params['limit'] = $navyParams['SIZEN'];
    $params['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
}
$totalPages = 0;
if ($usePageNavigation) {
    $countQuery = new \Bitrix\Main\Entity\Query(PaymentTable::getEntity());
    $countQuery->addSelect(new \Bitrix\Main\Entity\ExpressionField('CNT', 'COUNT(1)'));
    $countQuery->setFilter($params['filter']);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:order_payment.php

示例9: obtainDataOrders

 /**
  * Perform reading main data from database, no cache is used
  * @return void
  */
 protected function obtainDataOrders()
 {
     $select = array('ID', 'LID', 'PERSON_TYPE_ID', 'PAYED', 'DATE_PAYED', 'EMP_PAYED_ID', 'CANCELED', 'DATE_CANCELED', 'EMP_CANCELED_ID', 'REASON_CANCELED', 'MARKED', 'DATE_MARKED', 'EMP_MARKED_ID', 'REASON_MARKED', 'STATUS_ID', 'DATE_STATUS', 'PAY_VOUCHER_NUM', 'PAY_VOUCHER_DATE', 'EMP_STATUS_ID', 'PRICE_DELIVERY', 'ALLOW_DELIVERY', 'DATE_ALLOW_DELIVERY', 'EMP_ALLOW_DELIVERY_ID', 'DEDUCTED', 'DATE_DEDUCTED', 'EMP_DEDUCTED_ID', 'REASON_UNDO_DEDUCTED', 'RESERVED', 'PRICE', 'CURRENCY', 'DISCOUNT_VALUE', 'SUM_PAID', 'USER_ID', 'PAY_SYSTEM_ID', 'DELIVERY_ID', 'DATE_INSERT', 'DATE_UPDATE', 'USER_DESCRIPTION', 'ADDITIONAL_INFO', 'COMMENTS', 'TAX_VALUE', 'STAT_GID', 'RECURRING_ID', 'RECOUNT_FLAG', 'DELIVERY_DOC_NUM', 'DELIVERY_DOC_DATE', 'STORE_ID', 'ORDER_TOPIC', 'RESPONSIBLE_ID', 'DATE_PAY_BEFORE', 'DATE_BILL', 'ACCOUNT_NUMBER', 'TRACKING_NUMBER', 'XML_ID');
     $usePageNavigation = true;
     $navyParams = array();
     $navyParams = \CDBResult::GetNavParams();
     if ($navyParams['SHOW_ALL']) {
         $usePageNavigation = false;
     } else {
         $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
         $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
     }
     if (isset($this->arParams["ORDERS_PER_PAGE"]) && intval($this->arParams["ORDERS_PER_PAGE"]) > 0) {
         $navyParams['SIZEN'] = $this->arParams["ORDERS_PER_PAGE"];
     }
     if (isset($_REQUEST['show_all']) && $_REQUEST['show_all'] == "Y") {
         $usePageNavigation = false;
     }
     $getListParams = array('order' => array($this->sortBy => $this->sortOrder), 'filter' => $this->filter, 'select' => $select);
     if ($usePageNavigation) {
         $getListParams['limit'] = $navyParams['SIZEN'];
         $getListParams['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
     }
     $totalPages = 0;
     if ($usePageNavigation) {
         $countQuery = new \Bitrix\Main\Entity\Query(\Bitrix\Sale\Internals\OrderTable::getEntity());
         $countQuery->addSelect(new \Bitrix\Main\Entity\ExpressionField('CNT', 'COUNT(1)'));
         $countQuery->setFilter($getListParams['filter']);
         $totalCount = $countQuery->setLimit(null)->setOffset(null)->exec()->fetch();
         unset($countQuery);
         $totalCount = (int) $totalCount['CNT'];
         if ($totalCount > 0) {
             $totalPages = ceil($totalCount / $navyParams['SIZEN']);
             if ($navyParams['PAGEN'] > $totalPages) {
                 $navyParams['PAGEN'] = $totalPages;
             }
             $getListParams['limit'] = $navyParams['SIZEN'];
             $getListParams['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
         } else {
             $navyParams['PAGEN'] = 1;
             $getListParams['limit'] = $navyParams['SIZEN'];
             $getListParams['offset'] = 0;
         }
     }
     $this->dbQueryResult['ORDERS'] = new \CDBResult(\Bitrix\Sale\Internals\OrderTable::getList($getListParams));
     if ($usePageNavigation) {
         $this->dbQueryResult['ORDERS']->NavStart($getListParams['limit'], $navyParams['SHOW_ALL'], $navyParams['PAGEN']);
         $this->dbQueryResult['ORDERS']->NavRecordCount = $totalCount;
         $this->dbQueryResult['ORDERS']->NavPageCount = $totalPages;
         $this->dbQueryResult['ORDERS']->NavPageNomer = $navyParams['PAGEN'];
     } else {
         $this->dbQueryResult['ORDERS']->NavStart($this->arParams["ORDERS_PER_PAGE"], false);
     }
     if (empty($this->dbQueryResult['ORDERS'])) {
         return;
     }
     while ($arOrder = $this->dbQueryResult['ORDERS']->GetNext()) {
         $arOBasket = array();
         $dbBasket = CSaleBasket::GetList(array('NAME' => 'asc'), array("ORDER_ID" => $arOrder["ID"]), false, false, array('*'));
         while ($arBasket = $dbBasket->Fetch()) {
             if (CSaleBasketHelper::isSetItem($arBasket)) {
                 continue;
             }
             $arOBasket[$arBasket['ID']] = $arBasket;
         }
         $arOShipment = array();
         $dbShipment = \Bitrix\Sale\Internals\ShipmentTable::getList(array('select' => array('DELIVERY_NAME', 'SYSTEM', 'DELIVERY_ID'), 'filter' => array('ORDER_ID' => $arOrder['ID'])));
         while ($arShipment = $dbShipment->fetch()) {
             if ($arShipment['SYSTEM'] == 'Y') {
                 continue;
             }
             $arOShipment[] = $arShipment;
         }
         $dbPayment = \Bitrix\Sale\Internals\PaymentTable::getList(array('select' => array('PAY_SYSTEM_NAME', 'PAY_SYSTEM_ID'), 'filter' => array('ORDER_ID' => $arOrder['ID'])));
         $arOPayment = array();
         while ($arPayment = $dbPayment->fetch()) {
             $arOPayment[] = $arPayment;
         }
         $this->dbResult['ORDERS'][] = array("ORDER" => $arOrder, "BASKET_ITEMS" => $arOBasket, "SHIPMENT" => $arOShipment, "PAYMENT" => $arOPayment);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:85,代码来源:class.php

示例10: unset

            if (isset($_GET['ID'])) {
                $actionData['ID'] = $_GET['ID'];
                unset($_GET['ID'], $_REQUEST['ID']);
            }
            $actionData['AJAX_CALL'] = false;
            if (isset($_GET['AJAX_CALL'])) {
                $actionData['AJAX_CALL'] = true;
                // Must be transfered to main.interface.grid
                //unset($_GET['AJAX_CALL'], $_REQUEST['AJAX_CALL']);
            }
        }
    }
}
// <-- Try to extract user action data
$arNavParams = array('nPageSize' => $arParams['PRODUCT_COUNT']);
$arNavigation = CDBResult::GetNavParams($arParams['PRODUCT_COUNT']);
$CGridOptions = new CCrmGridOptions($arResult['GRID_ID']);
$arNavParams = $CGridOptions->GetNavParams($arNavParams);
$arNavParams['bShowAll'] = false;
$arFilter = $gridFilter = $CGridOptions->GetFilter($arResult['FILTER']);
$arFilter['CATALOG_ID'] = $catalogID;
$sectionID = isset($arParams['~SECTION_ID']) ? intval($arParams['~SECTION_ID']) : 0;
$bFilterSection = $bTree || !isset($arFilter['GRID_FILTER_APPLIED']) || !$arFilter['GRID_FILTER_APPLIED'] || isset($arFilter['LIST_SECTION_ID']) && $arFilter['LIST_SECTION_ID'] !== '';
if ($bFilterSection) {
    if (!$bTree && isset($arFilter['GRID_FILTER_APPLIED']) && $arFilter['GRID_FILTER_APPLIED'] && isset($arFilter['LIST_SECTION_ID'])) {
        $sectionID = intval($arFilter['LIST_SECTION_ID']);
    }
    $arFilter['SECTION_ID'] = $sectionID;
}
// reset section filter HACK
if (!is_array($_SESSION['main.interface.grid'])) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例11: onPrepareComponentParams

 /**
  * @inheritdoc
  */
 public function onPrepareComponentParams($arParams)
 {
     $arParams = parent::onPrepareComponentParams($arParams);
     $arParams['IBLOCK_CODE'] = htmlspecialchars(trim($arParams['IBLOCK_CODE']));
     $arParams['SECTION_CODE'] = htmlspecialchars(trim($arParams['SECTION_CODE']));
     $arParams['SECTION_ID'] = intval($arParams['SECTION_ID']);
     if (strlen($arParams['ELEMENT_SORT_BY1']) <= 0) {
         $arParams['ELEMENT_SORT_BY1'] = 'SORT';
     }
     if ($arParams['ELEMENT_SORT_ORDER1'] != 'DESC') {
         $arParams['ELEMENT_SORT_ORDER1'] = 'ASC';
     }
     if (strlen($arParams['ELEMENT_SORT_BY2']) <= 0) {
         $arParams['ELEMENT_SORT_BY2'] = 'ID';
     }
     if ($arParams['ELEMENT_SORT_ORDER2'] != 'DESC') {
         $arParams['ELEMENT_SORT_ORDER2'] = 'ASC';
     }
     if (strlen($arParams['ELEMENT_SORT_BY3']) <= 0) {
         $arParams['ELEMENT_SORT_BY3'] = 'ID';
     }
     if ($arParams['ELEMENT_SORT_ORDER3'] != 'DESC') {
         $arParams['ELEMENT_SORT_ORDER3'] = 'ASC';
     }
     if (strlen($arParams['SECTION_SORT_BY1']) <= 0) {
         $arParams['SECTION_SORT_BY1'] = 'SORT';
     }
     if ($arParams['SECTION_SORT_ORDER1'] != 'DESC') {
         $arParams['SECTION_SORT_ORDER1'] = 'ASC';
     }
     if (strlen($arParams['SECTION_SORT_BY2']) <= 0) {
         $arParams['SECTION_SORT_BY2'] = 'ID';
     }
     if ($arParams['SECTION_SORT_ORDER2'] != 'DESC') {
         $arParams['SECTION_SORT_ORDER2'] = 'ASC';
     }
     if ($arParams['PAGE']) {
         $arParams['PAGE'] = intval($_GET['page']);
     }
     if ($arParams['PAGING'] == 'Y') {
         \CPageOption::SetOptionString('main', 'nav_page_in_session', 'N');
         //не сохраняем в сессии параметры пагинации потому что это сбивает с толку пользователей
         $nav = \CDBResult::GetNavParams();
         if ($nav) {
             $arParams['PAGE'] = intval($nav['PAGEN']);
         } else {
             if ($arParams['PAGE']) {
                 $arParams['PAGE'] = intval($_GET['page']);
             }
         }
     }
     $arParams['PREPROD_SERVER'] = defined('PREPROD_SERVER') && PREPROD_SERVER;
     if (strlen($arParams['FILTER_NAME']) > 0 && preg_match('/^[A-Za-z_][A-Za-z01-9_]*$/', $arParams['FILTER_NAME'])) {
         $this->elementsFilter = array_merge($this->elementsFilter, $GLOBALS[$arParams['FILTER_NAME']]);
         $this->addCacheAdditionalId($GLOBALS[$arParams['FILTER_NAME']]);
     }
     //удаляем пустые элементы массива
     if (!empty($arParams['ELEMENT_PROPERTIES'])) {
         $arParams['ELEMENT_PROPERTIES'] = array_filter($arParams['ELEMENT_PROPERTIES']);
     }
     if (!empty($arParams['ELEMENT_FIELDS'])) {
         $arParams['ELEMENT_FIELDS'] = array_filter($arParams['ELEMENT_FIELDS']);
     }
     return $arParams;
 }
开发者ID:notagency,项目名称:notagency.base,代码行数:68,代码来源:class.php

示例12: executeProlog

 /**
  * выполяет действия перед кешированием 
  */
 protected function executeProlog()
 {
     if ($this->arParams['COUNT'] > 0) {
         if ($this->arParams['SHOW_NAV'] == 'Y') {
             \CPageOption::SetOptionString('main', 'nav_page_in_session', 'N');
             $this->navParams = array('nPageSize' => $this->arParams['COUNT']);
             $arNavigation = \CDBResult::GetNavParams($this->navParams);
             $this->cacheAddon = array($arNavigation);
         } else {
             $this->navParams = array('nTopCount' => $this->arParams['COUNT']);
         }
     }
 }
开发者ID:belukov,项目名称:bx-components,代码行数:16,代码来源:class.php

示例13: array

}
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
if ($arParams['USE_FILTER'] == 'Y') {
    $this->SetViewTarget('pre_page-head__title');
    $APPLICATION->IncludeComponent("bitrix:catalog.smart.filter", "tags", array("SECTION_ID" => $arResult["VARIABLES"]["SECTION_ID"], "SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"], "IBLOCK_TYPE" => $arParams['IBLOCK_TYPE'], "IBLOCK_ID" => $arParams['IBLOCK_ID'], "FILTER_NAME" => $arParams['FILTER_NAME'], "SEF_MODE" => "N", "CACHE_TYPE" => $arParams['CACHE_TYPE'], "CACHE_TIME" => $arParams['CACHE_TIME'], "CACHE_GROUPS" => $arParams['CACHE_GROUPS'], "SAVE_IN_SESSION" => "N", "INSTANT_RELOAD" => "N", "SECTION_TITLE" => "", "SECTION_DESCRIPTION" => ""), $component);
    $this->EndViewTarget('pre_page-head__title');
}
?>
<div class="row t-1 m_b10">
	<div class="cell s-6"><?php 
$arNavigation = CDBResult::GetNavParams(array("nPageSize" => $arParams["NEWS_COUNT"], "bDescPageNumbering" => $arParams["PAGER_DESC_NUMBERING"], "bShowAll" => $arParams["PAGER_SHOW_ALL"]));
if ($arNavigation['PAGEN'] < 2) {
    $GLOBALS['topFilter'] = $GLOBALS[$arParams['FILTER_NAME']];
    $GLOBALS['topFilter']['!PROPERTY_TOP'] = false;
    $topID = $APPLICATION->IncludeComponent("bitrix:news.list", "top-news", array("IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "NEWS_COUNT" => 1, "SORT_BY1" => $arParams["SORT_BY1"], "SORT_ORDER1" => $arParams["SORT_ORDER1"], "SORT_BY2" => $arParams["SORT_BY2"], "SORT_ORDER2" => $arParams["SORT_ORDER2"], "FIELD_CODE" => $arParams["LIST_FIELD_CODE"], "PROPERTY_CODE" => $arParams["LIST_PROPERTY_CODE"], "DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"], "SET_TITLE" => 'N', "SET_LAST_MODIFIED" => $arParams["SET_LAST_MODIFIED"], "MESSAGE_404" => 'N', "SET_STATUS_404" => 'N', "SHOW_404" => 'N', "FILE_404" => 'N', "INCLUDE_IBLOCK_INTO_CHAIN" => 'N', "ADD_SECTIONS_CHAIN" => 'N', "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "CACHE_FILTER" => $arParams["CACHE_FILTER"], "CACHE_GROUPS" => $arParams["CACHE_GROUPS"], "DISPLAY_TOP_PAGER" => 'N', "DISPLAY_BOTTOM_PAGER" => 'N', "DISPLAY_DATE" => $arParams["DISPLAY_DATE"], "DISPLAY_NAME" => "Y", "DISPLAY_PICTURE" => $arParams["DISPLAY_PICTURE"], "DISPLAY_PREVIEW_TEXT" => $arParams["DISPLAY_PREVIEW_TEXT"], "PREVIEW_TRUNCATE_LEN" => $arParams["PREVIEW_TRUNCATE_LEN"], "ACTIVE_DATE_FORMAT" => $arParams["LIST_ACTIVE_DATE_FORMAT"], "USE_PERMISSIONS" => $arParams["USE_PERMISSIONS"], "GROUP_PERMISSIONS" => $arParams["GROUP_PERMISSIONS"], "FILTER_NAME" => 'topFilter', "HIDE_LINK_WHEN_NO_DETAIL" => $arParams["HIDE_LINK_WHEN_NO_DETAIL"], "CHECK_DATES" => $arParams["CHECK_DATES"], "PARENT_SECTION" => $arResult["VARIABLES"]["SECTION_ID"], "PARENT_SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"], "DETAIL_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["detail"], "SECTION_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["section"], "IBLOCK_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["news"]), $component);
    if (!empty($topID)) {
        $GLOBALS[$arParams['FILTER_NAME']]['!ID'] = $topID;
    }
}
$APPLICATION->IncludeComponent("bitrix:news.list", "cell_s-6", array("TOP_NEWS" => $topID, "IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"], "NEWS_COUNT" => $arParams["NEWS_COUNT"], "SORT_BY1" => $arParams["SORT_BY1"], "SORT_ORDER1" => $arParams["SORT_ORDER1"], "SORT_BY2" => $arParams["SORT_BY2"], "SORT_ORDER2" => $arParams["SORT_ORDER2"], "FIELD_CODE" => $arParams["LIST_FIELD_CODE"], "PROPERTY_CODE" => $arParams["LIST_PROPERTY_CODE"], "DISPLAY_PANEL" => $arParams["DISPLAY_PANEL"], "SET_TITLE" => $arParams["SET_TITLE"], "SET_LAST_MODIFIED" => $arParams["SET_LAST_MODIFIED"], "MESSAGE_404" => $arParams["MESSAGE_404"], "SET_STATUS_404" => $arParams["SET_STATUS_404"], "SHOW_404" => $arParams["SHOW_404"], "FILE_404" => $arParams["FILE_404"], "INCLUDE_IBLOCK_INTO_CHAIN" => $arParams["INCLUDE_IBLOCK_INTO_CHAIN"], "ADD_SECTIONS_CHAIN" => $arParams["ADD_SECTIONS_CHAIN"], "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"], "CACHE_FILTER" => $arParams["CACHE_FILTER"], "CACHE_GROUPS" => $arParams["CACHE_GROUPS"], "DISPLAY_TOP_PAGER" => $arParams["DISPLAY_TOP_PAGER"], "DISPLAY_BOTTOM_PAGER" => $arParams["DISPLAY_BOTTOM_PAGER"], "PAGER_TITLE" => $arParams["PAGER_TITLE"], "PAGER_TEMPLATE" => $arParams["PAGER_TEMPLATE"], "PAGER_SHOW_ALWAYS" => $arParams["PAGER_SHOW_ALWAYS"], "PAGER_DESC_NUMBERING" => $arParams["PAGER_DESC_NUMBERING"], "PAGER_DESC_NUMBERING_CACHE_TIME" => $arParams["PAGER_DESC_NUMBERING_CACHE_TIME"], "PAGER_SHOW_ALL" => $arParams["PAGER_SHOW_ALL"], "PAGER_BASE_LINK_ENABLE" => $arParams["PAGER_BASE_LINK_ENABLE"], "PAGER_BASE_LINK" => $arParams["PAGER_BASE_LINK"], "PAGER_PARAMS_NAME" => $arParams["PAGER_PARAMS_NAME"], "DISPLAY_DATE" => $arParams["DISPLAY_DATE"], "DISPLAY_NAME" => "Y", "DISPLAY_PICTURE" => $arParams["DISPLAY_PICTURE"], "DISPLAY_PREVIEW_TEXT" => $arParams["DISPLAY_PREVIEW_TEXT"], "PREVIEW_TRUNCATE_LEN" => $arParams["PREVIEW_TRUNCATE_LEN"], "ACTIVE_DATE_FORMAT" => $arParams["LIST_ACTIVE_DATE_FORMAT"], "USE_PERMISSIONS" => $arParams["USE_PERMISSIONS"], "GROUP_PERMISSIONS" => $arParams["GROUP_PERMISSIONS"], "FILTER_NAME" => $arParams["FILTER_NAME"], "HIDE_LINK_WHEN_NO_DETAIL" => $arParams["HIDE_LINK_WHEN_NO_DETAIL"], "CHECK_DATES" => $arParams["CHECK_DATES"], "PARENT_SECTION" => $arResult["VARIABLES"]["SECTION_ID"], "PARENT_SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"], "DETAIL_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["detail"], "SECTION_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["section"], "IBLOCK_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["news"]), $component);
开发者ID:Tvaruga,项目名称:ae,代码行数:31,代码来源:section.php


注:本文中的CDBResult::GetNavParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。