當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAdminFilter::AddPresetToBase方法代碼示例

本文整理匯總了PHP中CAdminFilter::AddPresetToBase方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAdminFilter::AddPresetToBase方法的具體用法?PHP CAdminFilter::AddPresetToBase怎麽用?PHP CAdminFilter::AddPresetToBase使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAdminFilter的用法示例。


在下文中一共展示了CAdminFilter::AddPresetToBase方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 //precet
 $dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $IBLOCK_CATALOG_ID, "CODE" => "SALELEADER"));
 $arFields = array();
 while ($arProperty = $dbProperty->GetNext()) {
     $arFields["find_el_property_" . $arProperty["ID"]] = "";
 }
 $dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $IBLOCK_CATALOG_ID, "CODE" => "NEWPRODUCT"));
 while ($arProperty = $dbProperty->GetNext()) {
     $arFields["find_el_property_" . $arProperty["ID"]] = "";
 }
 $dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $IBLOCK_CATALOG_ID, "CODE" => "SPECIALOFFER"));
 while ($arProperty = $dbProperty->GetNext()) {
     $arFields["find_el_property_" . $arProperty["ID"]] = "";
 }
 require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/interface/admin_lib.php";
 CAdminFilter::AddPresetToBase(array("NAME" => GetMessage("WIZ_PRECET"), "FILTER_ID" => "tbl_product_admin_" . md5($iblockType . "." . $IBLOCK_CATALOG_ID) . "_filter", "LANGUAGE_ID" => $lang, "FIELDS" => $arFields));
 CUserOptions::SetOption("filter", "tbl_product_admin_" . md5($iblockType . "." . $IBLOCK_CATALOG_ID) . "_filter", array("rows" => "find_el_name, find_el_active, find_el_timestamp_from, find_el_timestamp_to"), true);
 CAdminFilter::SetDefaultRowsOption("tbl_product_admin_" . md5($iblockType . "." . $IBLOCK_CATALOG_ID) . "_filter", array("miss-0", "IBEL_A_F_PARENT"));
 //delete 1c props
 $arPropsToDelete = array("CML2_TAXES", "CML2_BASE_UNIT", "CML2_TRAITS", "CML2_ATTRIBUTES", "CML2_ARTICLE", "CML2_BAR_CODE", "CML2_FILES", "CML2_MANUFACTURER", "CML2_PICTURES");
 foreach ($arPropsToDelete as $code) {
     $dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $IBLOCK_CATALOG_ID, "XML_ID" => $code));
     if ($arProperty = $dbProperty->GetNext()) {
         CIBlockProperty::Delete($arProperty["ID"]);
     }
     if ($IBLOCK_OFFERS_ID) {
         $dbProperty = CIBlockProperty::GetList(array(), array("IBLOCK_ID" => $IBLOCK_OFFERS_ID, "XML_ID" => $code));
         if ($arProperty = $dbProperty->GetNext()) {
             CIBlockProperty::Delete($arProperty["ID"]);
         }
     }
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:catalog3.php


注:本文中的CAdminFilter::AddPresetToBase方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。