本文整理匯總了PHP中CAdminFilter::SetDefaultRowsOption方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAdminFilter::SetDefaultRowsOption方法的具體用法?PHP CAdminFilter::SetDefaultRowsOption怎麽用?PHP CAdminFilter::SetDefaultRowsOption使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAdminFilter
的用法示例。
在下文中一共展示了CAdminFilter::SetDefaultRowsOption方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$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"]);
}
}
}
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/catalog/index.php", array("CATALOG_IBLOCK_ID" => $IBLOCK_CATALOG_ID));