本文整理汇总了PHP中CIBlockType::GetByIDLang方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockType::GetByIDLang方法的具体用法?PHP CIBlockType::GetByIDLang怎么用?PHP CIBlockType::GetByIDLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockType
的用法示例。
在下文中一共展示了CIBlockType::GetByIDLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetIBlockTypes
public function GetIBlockTypes($lid, $catalogOnly = true, $hideOffers = true)
{
CModule::IncludeModule("iblock");
$arTypeAll = array();
$dbIBlock = CIBlock::GetList(array("IBLOCK_TYPE" => "ASC", "NAME" => "ASC"), array("LID" => $lid));
while ($arIBlock = $dbIBlock->Fetch()) {
if (true == $catalogOnly) {
if (CModule::IncludeModule("catalog") && CCatalog::GetByID($arIBlock["ID"])) {
if ($hideOffers == true && CCatalogSKU::GetInfoByOfferIBlock($arIBlock["ID"])) {
continue;
}
$arTypeIblock[] = $arIBlock;
}
} else {
$arTypeIblock[] = $arIBlock;
}
}
unset($dbIBlock);
foreach ($arTypeIblock as $arIBlock) {
$arType = CIBlockType::GetByIDLang($arIBlock["IBLOCK_TYPE_ID"], LANG);
$arTypeAll[$arType["ID"]]["ID"] = $arType["ID"];
$arTypeAll[$arType["ID"]]["NAME"] = "{$arType["NAME"]} [{$arType["ID"]}]";
$arTypeAll[$arType["ID"]]["IBLOCK"][$arIBlock["ID"]] = "{$arIBlock["NAME"]} [{$arIBlock["ID"]}]";
unset($arType);
}
unset($arTypeIblock);
return $arTypeAll;
}
示例2: getTypesFormatted
function getTypesFormatted() {
$out = '';
$rResuls = CIBlockType::GetList();
while (false !== ($type = $rResuls->GetNext())) {
$arType = CIBlockType::GetByIDLang($type['ID'], LANGUAGE_ID, true);
$out .= sprintf('<option value="%s">%s</option>', $type['ID'], $arType['NAME']);
}
return $out;
}
示例3: get_iblock_types
function get_iblock_types()
{
$rIBlockTypeList = CIBlockType::GetList(array('SORT' => 'ASC'), array());
$arIBlockTypeList = array();
while ($iblock_type = $rIBlockTypeList->GetNext()) {
$arIBlockTypeList[] = $iblock_type;
}
foreach ($arIBlockTypeList as $i => $iblock_type) {
$iblock_lang_settings = CIBlockType::GetByIDLang($iblock_type['ID'], LANGUAGE_ID, true);
$arIBlockTypeList[$i]['NAME'] = $iblock_lang_settings['NAME'];
}
return $arIBlockTypeList;
}
示例4: GetIBlockTypes
function GetIBlockTypes($arTop = false)
{
if (is_array($arTop)) {
$arIBlockType = $arTop;
} else {
$arIBlockType = array();
}
$rsIBlockType = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
while ($arr = $rsIBlockType->Fetch()) {
if ($ar = CIBlockType::GetByIDLang($arr["ID"], LANGUAGE_ID)) {
$arIBlockType[$arr["ID"]] = "[" . $arr["ID"] . "] " . $ar["~NAME"];
}
}
return $arIBlockType;
}
示例5: check
public static function check($type, $data = false)
{
$data = self::canonizeData($type, $data);
$type = trim($data['ID']);
$result = \CIBlockType::GetByID($type);
$cdata = $result->Fetch();
if ($cdata) {
$cdata['LANG'] = array();
foreach (array_keys(\TAO::getLangs()) as $lang) {
$l = \CIBlockType::GetByIDLang($type, $lang);
$cdata['LANG'][$lang] = array('NAME' => $l['NAME'], 'ELEMENT_NAME' => $l['ELEMENT_NAME'], 'SECTION_NAME' => $l['SECTION_NAME']);
}
$cdata = \TAO::mergeArgs($cdata, $data);
self::updateType($cdata);
} else {
self::addNewType($data);
}
}
示例6: GetFilterDropDown
function GetFilterDropDown($bFilter = false)
{
if($bFilter)
$arrDropdown = array(
"no" => GetMessage("SEARCH_CP_NO_LIMIT"),
"main" => "[main] ".GetMessage("SEARCH_CP_STATIC"),
);
else
$arrDropdown = array();
if(IsModuleInstalled("forum"))
$arrDropdown["forum"] = "[forum] ".GetMessage("SEARCH_CP_FORUM");
if(CModule::IncludeModule("iblock"))
{
$rsType = CIBlockType::GetList(array("sort"=>"asc"), array("ACTIVE"=>"Y"));
while ($arr=$rsType->Fetch())
{
if($ar=CIBlockType::GetByIDLang($arr["ID"], LANGUAGE_ID))
$arrDropdown["iblock_".$arr["ID"]] = "[iblock_".$arr["ID"]."] ".$ar["~NAME"];
}
}
if(IsModuleInstalled("blog"))
{
$arrDropdown["blog"] = "[blog] ".GetMessage("SEARCH_CP_BLOG");
if($bFilter)
$arrDropdown["microblog"] = "[microblog] ".GetMessage("SEARCH_CP_MICROBLOG");
}
if(IsModuleInstalled("socialnetwork"))
{
$arrDropdown["socialnetwork"] = "[socialnetwork] ".GetMessage("SEARCH_CP_SOCNET");
$arrDropdown["socialnetwork_user"] = "[socialnetwork_user] ".GetMessage("SEARCH_CP_SOCNET_USER");
}
if(IsModuleInstalled("intranet"))
$arrDropdown["intranet"] = "[intranet] ".GetMessage("SEARCH_CP_INTRANET_USERS");
if(IsModuleInstalled("crm"))
$arrDropdown["crm"] = "[crm] ".GetMessage("SEARCH_CP_CRM");
return $arrDropdown;
}
示例7: array
$arOwnBlock['OFFERS_PROPERTY_ID'] = $arOneCatalog['SKU_PROPERTY_ID'];
$arIBlockFullInfo[$arOneCatalog['PRODUCT_IBLOCK_ID']] = $arOwnBlock;
unset($arOwnBlock);
}
$arIBlockFullInfo[$arOneCatalog['IBLOCK_ID']] = $arIBlock;
if ('Y' == $arIBlock['IS_CATALOG'])
$arCatalogList[$arOneCatalog['IBLOCK_ID']] = $arIBlock;
unset($arIBlock);
}
$arIBlockTypeIDList = array();
$arIBlockTypeNameList = array();
$rsIBlockTypes = CIBlockType::GetList(array("sort"=>"asc"), array("ACTIVE"=>"Y"));
while ($arIBlockType = $rsIBlockTypes->Fetch())
{
if ($ar = CIBlockType::GetByIDLang($arIBlockType["ID"], LANGUAGE_ID, true))
{
$arIBlockTypeIDList[] = htmlspecialcharsbx($arIBlockType["ID"]);
$arIBlockTypeNameList[] = htmlspecialcharsbx('['.$arIBlockType["ID"].'] '.$ar["~NAME"]);
}
}
$arDoubleIBlockFullInfo = $arIBlockFullInfo;
?>
<tr><td><?
if (!empty($arRecurring))
{
$strRecurring = Loc::getMessage('SMALL_BUSINESS_RECURRING_ERR_LIST').'<ul><li>'.implode('</li><li>', $arRecurring).'</li></ul>'.Loc::getMessage('SMALL_BUSINESS_RECURRING_ERR_LIST_CLEAR');
CAdminMessage::ShowMessage(array(
"MESSAGE" => Loc::getMessage("SMALL_BUSINESS_RECURRING_ERR"),
示例8: getLangData
/**
* getLangData
* @param $iblockTypeId
* @return array
*/
private function getLangData($iblockTypeId)
{
$CIblockType = new \CIBlockType();
$lang = new \CLanguage();
$result = array();
$langDbRes = $lang->GetList($by = "lid", $order = "desc", array());
while ($langData = $langDbRes->Fetch()) {
$typeLangItemTmp = $CIblockType->GetByIDLang($iblockTypeId, $langData['LID']);
$typeLangItem = array();
foreach ($typeLangItemTmp as $key => $value) {
if (strstr($key, '~')) {
continue;
}
$typeLangItem[$key] = $value;
}
$result[$langData['LID']] = $typeLangItem;
}
return $result;
}
示例9: foreach
foreach ($arTypes as $arType) {
if ($bUserIsAdmin || !empty($arType["IBLOCKS"]["X"])) {
$arResult[] = array("text" => $arType["NAME~"], "url" => "iblock_admin.php?type=" . $arType["ID"] . "&lang=" . LANGUAGE_ID . "&admin=Y", "more_url" => array("iblock_admin.php?type=" . $arType["ID"] . "&lang=" . LANGUAGE_ID . "&admin=Y", "iblock_edit.php?type=" . $arType["ID"] . "&lang=" . LANGUAGE_ID . "&admin=Y"), "title" => $arType["NAME~"], "parent_menu" => "global_menu_content", "sort" => 200 + $obt_index, "icon" => "iblock_menu_icon_types", "page_icon" => "iblock_page_icon_settings", "module_id" => "iblock", "items_id" => "menu_iblock_admin_/" . $arType["ID"], "dynamic" => true, "items" => _get_iblocks_admin_menu($arType));
$obt_index++;
}
}
return $arResult;
}
$aMenu = array();
//Read all necessary data from database
global $USER;
$bUserIsAdmin = $USER->IsAdmin();
$arTypes = array();
$rsTypes = CIBlockType::GetList(array("SORT" => "ASC"));
while ($arType = $rsTypes->Fetch()) {
$arType = CIBlockType::GetByIDLang($arType["ID"], LANGUAGE_ID);
$arTypes[$arType["ID"]] = array("ID" => $arType["ID"], "NAME" => $arType["NAME"], "NAME~" => $arType["NAME"], "ELEMENT_NAME" => $arType["ELEMENT_NAME"], "SECTIONS" => $arType["SECTIONS"], "IBLOCKS" => array("S" => array(), "W" => array(), "X" => array()));
}
$bHasXRight = false;
$bHasWRight = false;
$bHasSRight = false;
if ($bUserIsAdmin) {
$rsIBlocks = CIBlock::GetList(array("SORT" => "asc", "NAME" => "ASC"));
while ($arIBlock = $rsIBlocks->Fetch()) {
if (!$arIBlock["ELEMENTS_NAME"]) {
$arIBlock["ELEMENTS_NAME"] = $arTypes[$arIBlock["IBLOCK_TYPE_ID"]]["ELEMENT_NAME"] ?: GetMessage("IBLOCK_MENU_ELEMENTS");
}
$arItem = array("ID" => $arIBlock["ID"], "NAME" => $arIBlock["NAME"], "NAME~" => htmlspecialcharsex($arIBlock["NAME"]), "ELEMENTS_NAME" => $arIBlock["ELEMENTS_NAME"], "URL_PART" => "type=" . $arIBlock["IBLOCK_TYPE_ID"] . "&lang=" . LANGUAGE_ID . "&IBLOCK_ID=" . $arIBlock["ID"]);
$arTypes[$arIBlock["IBLOCK_TYPE_ID"]]["IBLOCKS"]["X"][] = $arItem;
$bHasXRight = true;
$arTypes[$arIBlock["IBLOCK_TYPE_ID"]]["IBLOCKS"]["W"][] = $arItem;
示例10: array
$bSearch = false;
$bCurrency = false;
$arCurrencyList = array();
$minImageSize = array("W" => 1, "H"=>1);
$maxImageSize = array(
"W" => COption::GetOptionString("iblock", "list_image_size"),
"H" => COption::GetOptionString("iblock", "list_image_size"),
);
if (isset($_REQUEST['mode']) && ($_REQUEST['mode']=='list' || $_REQUEST['mode']=='frame'))
{
CFile::DisableJSFunction(true);
}
$arIBTYPE = CIBlockType::GetByIDLang($type, LANGUAGE_ID);
if($arIBTYPE===false)
$APPLICATION->AuthForm(GetMessage("IBLIST_A_BAD_BLOCK_TYPE_ID"));
$IBLOCK_ID = 0;
if (isset($_REQUEST['IBLOCK_ID']))
$IBLOCK_ID = (int)$_REQUEST["IBLOCK_ID"];
$arIBlock = CIBlock::GetArrayByID($IBLOCK_ID);
if($arIBlock)
$bBadBlock = !CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_admin_display");
else
$bBadBlock = true;
if($bBadBlock)
{
示例11: htmlspecialcharsbx
if (strlen($arParams["PATH_TO_BP"]) <= 0) {
$arParams["PATH_TO_BP"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=bp&" . $arParams["BLOCK_VAR"] . "=#block_id#");
}
$arParams["PATH_TO_BP"] = $arParams["PATH_TO_BP"] . (strpos($arParams["PATH_TO_BP"], "?") === false ? "?" : "&") . bitrix_sessid_get();
$arResult["BackUrl"] = urlencode(strlen($_REQUEST["back_url"]) <= 0 ? $APPLICATION->GetCurPageParam() : $_REQUEST["back_url"]);
$arResult["PATH_TO_INDEX"] = htmlspecialcharsbx(CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_INDEX"], array()));
$arResult["FatalErrorMessage"] = "";
$arResult["ErrorMessage"] = "";
$arParams["IBLOCK_TYPE"] = trim($arParams["IBLOCK_TYPE"]);
if (strlen($arParams["IBLOCK_TYPE"]) <= 0) {
$arResult["FatalErrorMessage"] .= GetMessage("BPWC_WNC_EMPTY_IBLOCK_TYPE") . ". ";
}
$arParams["BLOCK_ID"] = intval($arParams["BLOCK_ID"]);
if (strlen($arResult["FatalErrorMessage"]) <= 0) {
$arResult["BlockType"] = null;
$ar = CIBlockType::GetByIDLang($arParams["IBLOCK_TYPE"], LANGUAGE_ID, true);
if ($ar) {
$arResult["BlockType"] = $ar;
} else {
$arResult["FatalErrorMessage"] .= GetMessage("BPWC_WNC_WRONG_IBLOCK_TYPE") . ". ";
}
}
if (strlen($arResult["FatalErrorMessage"]) <= 0) {
if (strlen($_REQUEST["doCancel"]) > 0) {
LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_INDEX"], array()));
}
}
if (strlen($arResult["FatalErrorMessage"]) <= 0) {
$arResult["Step"] = intval($_REQUEST["bp_step"]);
if ($arResult["Step"] <= 0) {
$arResult["Step"] = 1;
示例12: foreach
foreach ($arParams["IBLOCK_TYPE_MASK"] as $val) {
$val = substr($val, 0, -1);
if (!empty($val) && strpos($arIbType["ID"], $val) !== false) {
$continue = false;
break;
}
}
}
} else {
$continue = false;
}
if ($continue) {
continue;
}
$level = 1 - ($arParams["DEPTH_LEVEL_START"] - 1);
$arIBType = empty($arIbType['NAME']) ? CIBlockType::GetByIDLang($arIbType["ID"], LANG) : $arIbType;
if ($arIBType) {
$mainCnt = 0;
$mainIndex = 0;
if ($arParams["DEPTH_LEVEL_START"] <= 1) {
$depthLevel = $level;
$url = str_replace("#IBLOCK_TYPE#", $arIbType["ID"], $arParams["IBLOCK_TYPE_URL"]);
$url = str_replace($arParams['IBLOCK_TYPE_URL_REPLACE'], "", $url);
$arResult[$i] = array($arIBType["NAME"], $url, array());
$arResult[$i][3] = array("FROM_IBLOCK" => "1", "IS_PARENT" => "", "DEPTH_LEVEL" => $depthLevel, "FILTER" => $arFilterDefault + array("IBLOCK_TYPE" => $arIbType['ID']));
$mainIndex = $i;
$i++;
}
if ($arParams["DEPTH_LEVEL_FINISH"] >= 2) {
$arFilter = array('TYPE' => $arIbType["ID"], 'ID' => $arParams["IBLOCK_ID"], 'SITE_ID' => SITE_ID, 'ACTIVE' => 'Y', "CNT_ACTIVE" => 'Y');
$res = CIBlock::GetList(array($arParams['IBLOCK_SORT_FIELD'] => $arParams['IBLOCK_SORT_ORDER']), $arFilter, $bIncCnt);
示例13: array
<?php
include $_SERVER['DOCUMENT_ROOT'] . '/local/vendor/techart/bitrix.tao/include/prolog_admin.php';
?>
<h2>Экспорт текущей схемы инфоблоков</h2>
<ul>
<?php
$result = CIBlockType::GetList(array('SORT' => 'ASC'), array('CHECK_PERMISSIONS' => 'N'));
while ($row = $result->Fetch()) {
$r = CIBlockType::GetByIDLang($row['ID'], 'ru');
$name = $r['NAME'];
$type = $row['ID'];
?>
<li><?php
echo $name;
?>
</li><ul>
<?php
$iresult = CIBlock::GetList(array('SORT' => 'ASC'), array('CHECK_PERMISSIONS' => 'N', 'TYPE' => $type));
while ($irow = $iresult->Fetch()) {
?>
<li><a href="tao-export-iblock.php?id=<?php
echo $irow['ID'];
?>
"><?php
echo $irow['NAME'];
?>
</a></li><?php
}
?>
示例14: array
Chlist(cnt, i, ar[i + 3]);
Chlist(cnt, i);
}
//-->
</script>
<?php
$arIBlockCache = array();
$arIBlockTypeCache = array();
$maxLevel = 0;
$dbIBlockList = CIBlock::GetList(array("IBLOCK_TYPE" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"));
while ($arIBlock = $dbIBlockList->Fetch()) {
$arIBlockCache[] = $arIBlock;
if (!array_key_exists($arIBlock["IBLOCK_TYPE_ID"], $arIBlockTypeCache)) {
if ($arIBlockType = CIBlockType::GetByIDLang($arIBlock["IBLOCK_TYPE_ID"], LANG, true)) {
$arIBlockTypeCache[$arIBlock["IBLOCK_TYPE_ID"]] = $arIBlockType["NAME"];
}
}
$arSections = array();
$dbSectionTree = CIBlockSection::GetTreeList(array("IBLOCK_ID" => $arIBlock["ID"]));
while ($arSectionTree = $dbSectionTree->Fetch()) {
if ($maxLevel < $arSectionTree["DEPTH_LEVEL"]) {
$maxLevel = $arSectionTree["DEPTH_LEVEL"];
}
$arSectionTree["IBLOCK_SECTION_ID"] = IntVal($arSectionTree["IBLOCK_SECTION_ID"]);
if (!is_array($arSections[$arSectionTree["IBLOCK_SECTION_ID"]])) {
$arSections[$arSectionTree["IBLOCK_SECTION_ID"]] = array();
}
$arSections[$arSectionTree["IBLOCK_SECTION_ID"]][] = array("ID" => $arSectionTree["ID"], "NAME" => $arSectionTree["NAME"]);
}
示例15: IncludeModuleLangFile
<?php
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/iblock/iblock.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/iblock/prolog.php";
IncludeModuleLangFile(__FILE__);
if (!CModule::IncludeModule("workflow")) {
die;
}
$arIBTYPE = CIBlockType::GetByIDLang($type, LANG);
if ($arIBTYPE == false) {
die;
}
$IBLOCK_ID = intval($IBLOCK_ID);
$ELEMENT_ID = intval($ELEMENT_ID);
$find_section_section = intval($find_section_section);
$iblock = CIBlock::GetByID($IBLOCK_ID);
if ($arIBlock = $iblock->Fetch()) {
if (!CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_admin_display")) {
$APPLICATION->SetTitle(GetMessage("IBLOCK_ADM_HISTORY_TITLE", array("#ID#" => $ELEMENT_ID)));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
echo ShowError(GetMessage("IBLOCK_ADM_HISTORY_BAD_IBLOCK"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
die;
}
}
$LAST_ID = CIBlockElement::WF_GetLast($ELEMENT_ID);
$z = CIblockElement::GetByID($LAST_ID);
if (!($zr = $z->Fetch())) {
$APPLICATION->SetTitle(GetMessage("IBLOCK_ADM_HISTORY_TITLE", array("#ID#" => $ELEMENT_ID)));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";