本文整理汇总了PHP中CIBlockParameters::Add404Settings方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockParameters::Add404Settings方法的具体用法?PHP CIBlockParameters::Add404Settings怎么用?PHP CIBlockParameters::Add404Settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockParameters
的用法示例。
在下文中一共展示了CIBlockParameters::Add404Settings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
die;
}
if (!CModule::IncludeModule("iblock")) {
return;
}
$arTypes = CIBlockParameters::GetIBlockTypes();
$arIBlocks = array();
$db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arRes = $db_iblock->Fetch()) {
$arIBlocks[$arRes["ID"]] = $arRes["NAME"];
}
$arProperty_LNS = array();
$rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "IBLOCK_ID" => isset($arCurrentValues["IBLOCK_ID"]) ? $arCurrentValues["IBLOCK_ID"] : $arCurrentValues["ID"]));
while ($arr = $rsProp->Fetch()) {
$arProperty[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
if (in_array($arr["PROPERTY_TYPE"], array("L", "N", "S"))) {
$arProperty_LNS[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
}
}
$arUGroupsEx = array();
$dbUGroups = CGroup::GetList($by = "c_sort", $order = "asc");
while ($arUGroups = $dbUGroups->Fetch()) {
$arUGroupsEx[$arUGroups["ID"]] = $arUGroups["NAME"];
}
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("AJAX_MODE" => array(), "IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("T_IBLOCK_DESC_LIST_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "ELEMENT_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BND_ELEMENT_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["ELEMENT_ID"]}'), "ELEMENT_CODE" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BND_ELEMENT_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "CHECK_DATES" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_DESC_CHECK_DATES"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "DATA_SOURCE"), "PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("T_IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "IBLOCK_URL" => CIBlockParameters::GetPathTemplateParam("LIST", "IBLOCK_URL", GetMessage("T_IBLOCK_DESC_LIST_PAGE_URL"), "", "URL_TEMPLATES"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("CP_BND_DETAIL_URL"), "", "URL_TEMPLATES"), "SET_TITLE" => array(), "SET_CANONICAL_URL" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_CANONICAL_URL"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SET_BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_BROWSER_TITLE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_BROWSER_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_BROWSER_TITLE']) && $arCurrentValues['SET_BROWSER_TITLE'] == 'N' ? 'Y' : 'N'), "SET_META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_META_KEYWORDS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_KEYWORDS"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_META_KEYWORDS']) && $arCurrentValues['SET_META_KEYWORDS'] == 'N' ? 'Y' : 'N'), "SET_META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_META_DESCRIPTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LNS), "HIDDEN" => isset($arCurrentValues['SET_META_DESCRIPTION']) && $arCurrentValues['SET_META_DESCRIPTION'] == 'N' ? 'Y' : 'N'), "SET_LAST_MODIFIED" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BND_SET_LAST_MODIFIED"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "INCLUDE_IBLOCK_INTO_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_INCLUDE_IBLOCK_INTO_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_SECTIONS_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_SECTIONS_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "ADD_ELEMENT_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_ADD_ELEMENT_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ACTIVE_DATE_FORMAT" => CIBlockParameters::GetDateFormat(GetMessage("T_IBLOCK_DESC_ACTIVE_DATE_FORMAT"), "ADDITIONAL_SETTINGS"), "USE_PERMISSIONS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_USE_PERMISSIONS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "GROUP_PERMISSIONS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_GROUP_PERMISSIONS"), "TYPE" => "LIST", "VALUES" => $arUGroupsEx, "DEFAULT" => array(1), "MULTIPLE" => "Y"), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BND_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
CIBlockParameters::AddPagerSettings($arComponentParameters, GetMessage("T_IBLOCK_DESC_PAGER_PAGE"), false, true, true, $arCurrentValues["PAGER_BASE_LINK_ENABLE"] === "Y");
unset($arComponentParameters["PARAMETERS"]["PAGER_SHOW_ALWAYS"]);
CIBlockParameters::Add404Settings($arComponentParameters, $arCurrentValues);
if ($arCurrentValues["USE_PERMISSIONS"] != "Y") {
unset($arComponentParameters["PARAMETERS"]["GROUP_PERMISSIONS"]);
}