本文整理汇总了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"]);
}
}