当前位置: 首页>>代码示例>>PHP>>正文


PHP CIBlockType::GetList方法代码示例

本文整理汇总了PHP中CIBlockType::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockType::GetList方法的具体用法?PHP CIBlockType::GetList怎么用?PHP CIBlockType::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CIBlockType的用法示例。


在下文中一共展示了CIBlockType::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     \CModule::IncludeModule('iblock');
     $resTypes = \CIBlockType::GetList(array('id' => 'asc'));
     while ($arType = $resTypes->Fetch()) {
         $output->writeln("<info>" . $arType['ID'] . "</info>");
     }
 }
开发者ID:ASDAFF,项目名称:bitrix-console-tool,代码行数:8,代码来源:IBlockListTypesCommand.php

示例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;
}
开发者ID:ASDAFF,项目名称:bx_ichannels,代码行数:9,代码来源:ichannels_iblock.php

示例3: testAdd

 public function testAdd()
 {
     $this->_injectDutyCollector();
     $ibType = \CIBlockType::GetList()->Fetch();
     $ib = new \CIBlock();
     $ibId = $ib->Add(array('IBLOCK_TYPE_ID' => $ibType['ID'], 'NAME' => 'New Iblock', 'SITE_ID' => 's1'));
     $this->assertNotEmpty($ibId, $this->errorMessage('not create iblock id', array(':lastError' => $ib->LAST_ERROR)));
     $prop = new \CIBlockProperty();
     $propId = $prop->Add(array('IBLOCK_ID' => $ibId, 'CODE' => 'propCode', 'NAME' => 'Property NAME'));
     $this->assertNotEmpty($propId, $this->errorMessage('not create property iblock id', array(':lastError' => $ib->LAST_ERROR)));
     $sec = new \CIBlockSection();
     $secId = $sec->Add(array('IBLOCK_ID' => $ibId, 'NAME' => 'Iblock Section'));
     $this->assertNotEmpty($secId, $this->errorMessage('not create section iblock id', array(':lastError' => $ib->LAST_ERROR)));
     // ¬ итоге должны получитс¤
     // данные по добавлению »Ѕ
     $this->assertNotEmpty($this->_getCollectorFixes(AddProcess::className(), IblockHandler::className()));
     // данные по добавлению свойства
     $this->assertNotEmpty($this->_getCollectorFixes(AddProcess::className(), IblockPropertyHandler::className()));
     // данные по добавлению секции
     $this->assertNotEmpty($this->_getCollectorFixes(AddProcess::className(), IblockSectionHandler::className()));
     $refFixes = $this->_getCollectorFixes('reference');
     // фиксаци¤ изменений
     Module::getInstance()->commitDutyChanges();
     // добавлены записи журнала обновлений (в базу)
     /** @var $logRecords AppliedChangesLogModel[] */
     $logRecords = AppliedChangesLogModel::find(array('order' => array('id' => 'desc'), 'limit' => 10));
     $this->assertTrue(count($logRecords) > 3);
     $iterationsCount = 0;
     foreach ($logRecords as $logRecord) {
         if ($logRecord->processName == Module::SPECIAL_PROCESS_FIX_REFERENCE) {
             continue;
         }
         if ($logRecord->processName != AddProcess::className()) {
             $this->throwError($this->errorMessage('last log records need been update process'), $logRecord->processName);
         }
         if (++$iterationsCount > 3) {
             break;
         }
         $data = $logRecord->updateData;
         switch ($logRecord->subjectName) {
             case IblockHandler::className():
                 (!$data['iblock'] || $data['iblock']['ID'] != $ibId) && $this->throwError($this->errorMessage('iblock not registered after update', array(':actual' => $data['iblock']['ID'], ':need' => $ibId)));
                 break;
             case IblockPropertyHandler::className():
                 $data['ID'] != $propId && $this->throwError($this->errorMessage('property iblock not registered after update', array(':original' => $propId, ':actual' => $data['ID'])));
                 break;
             case IblockSectionHandler::className():
                 $data['ID'] != $secId && $this->throwError($this->errorMessage('section iblock not registered after update', array(':original' => $secId, ':actual' => $data['ID'])));
                 break;
         }
     }
     // добавлены три вида ссылок в фиксаци¤х
     $this->assertEquals(3, count($refFixes), $this->errorMessage('links expected count', array(':count' => 3)));
     $this->_iblockId = $ibId;
     $this->_propertyId = $propId;
     $this->_sectionId = $secId;
 }
开发者ID:ASDAFF,项目名称:bitrix-module-migrations,代码行数:57,代码来源:fixtestcase.php

示例4: showIblockTypesSelect

 static function showIblockTypesSelect()
 {
     $res = CIBlockType::GetList();
     echo '<select name="IBLOCK_TYPE">';
     while ($ar_res = $res->Fetch()) {
         echo "<option value='{$ar_res['ID']}'>{$ar_res['ID']}</option>";
     }
     echo '</select>';
 }
开发者ID:ASDAFF,项目名称:bitrix-modules-iblocktools,代码行数:9,代码来源:formsHelper.php

示例5: getIblockTypes

 public function getIblockTypes($filter = array())
 {
     $filter['CHECK_PERMISSIONS'] = 'N';
     $dbResult = \CIBlockType::GetList(array('SORT' => 'ASC'), $filter);
     $list = array();
     while ($aItem = $dbResult->Fetch()) {
         $list[] = $aItem;
     }
     return $list;
 }
开发者ID:andreyryabin,项目名称:sprint.migration,代码行数:10,代码来源:IblockHelper.php

示例6: 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;
}
开发者ID:ASDAFF,项目名称:bx-ibulkapi,代码行数:13,代码来源:ibulkapi_iblock.php

示例7: 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;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:15,代码来源:comp_parameters.php

示例8: 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;
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:44,代码来源:comp_parameters.php

示例9: array

}
if (!IsModuleInstalled("iblock") || !CModule::IncludeModule("iblock")) {
    return;
}
$arSites = array();
$defSite = "";
$sitesSort = "SORT";
$sitesBy = "ASC";
$rsSite = CSite::GetList($sitesSort, $sitesBy, array());
while ($arSite = $rsSite->Fetch()) {
    $arSites[$arSite["ID"]] = $arSite["NAME"];
    if ($arSite["DEF"] == "Y") {
        $defSite = $arSite["ID"];
    }
}
$arIBlockTypes = array();
$defIBlockType = "news";
$rsIBlockType = CIBlockType::GetList(array("SORT" => "ASC"));
while ($arIBlockType = $rsIBlockType->Fetch()) {
    if ($arIBlockType = CIBlockType::GetByIDLang($arIBlockType["ID"], LANG)) {
        $arIBlockTypes[$arIBlockType["ID"]] = $arIBlockType["NAME"];
    }
}
$arIBlocks = array("-" => GetMessage("MAIN_ALL"));
$rsIBlock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $arCurrentValues["SITE_ID"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arIBlock = $rsIBlock->Fetch()) {
    $arIBlocks[$arIBlock["ID"]] = $arIBlock["NAME"];
}
$arSorts = array("ASC" => GetMessage("CP_BSN_ORDER_ASC"), "DESC" => GetMessage("CP_BSN_ORDER_DESC"));
$arSortFields = array("ACTIVE_FROM" => GetMessage("CP_BSN_ACTIVE_FROM"), "SORT" => GetMessage("CP_BSN_SORT"));
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("SITE_ID" => array("NAME" => GetMessage("CP_BSN_SITE_ID"), "TYPE" => "LIST", "VALUES" => $arSites, "DEFAULT" => $defSite, "REFRESH" => "Y"), "IBLOCK_TYPE" => array("NAME" => GetMessage("CP_BSN_IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockTypes, "DEFAULT" => $defIBlockType, "REFRESH" => "Y"), "ID" => array("NAME" => GetMessage("CP_BSN_ID"), "TYPE" => "LIST", "VALUES" => $arIBlocks), "SORT_BY" => array("NAME" => GetMessage("CP_BSN_SORT_BY"), "TYPE" => "LIST", "DEFAULT" => "ACTIVE_FROM", "VALUES" => $arSortFields), "SORT_ORDER" => array("NAME" => GetMessage("CP_BSN_SORT_ORDER"), "TYPE" => "LIST", "DEFAULT" => "DESC", "VALUES" => $arSorts)));
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:.parameters.php

示例10: array

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('wiki')) {
    return false;
}
if (!CModule::IncludeModule('iblock')) {
    return false;
}
$dbIBlockType = CIBlockType::GetList(array('sort' => 'asc'), array('ACTIVE' => 'Y'));
$arIblockType = array();
while ($arIBlockType = $dbIBlockType->Fetch()) {
    if ($arIBlockTypeLang = CIBlockType::GetByIDLang($arIBlockType['ID'], LANGUAGE_ID)) {
        $arIblockType[$arIBlockType['ID']] = '[' . $arIBlockType['ID'] . '] ' . $arIBlockTypeLang['NAME'];
    }
}
$arTypes = CIBlockParameters::GetIBlockTypes();
$arIBlocks = array();
$db_iblock = CIBlock::GetList(array('SORT' => 'ASC'), array('SITE_ID' => $_REQUEST['site'], 'TYPE' => !empty($arCurrentValues['IBLOCK_TYPE']) ? $arCurrentValues['IBLOCK_TYPE'] : 'wiki'));
while ($arRes = $db_iblock->Fetch()) {
    $arIBlocks[$arRes['ID']] = $arRes['NAME'];
}
$arComponentParameters = array('GROUPS' => array('VARIABLE_ALIASES' => array('NAME' => GetMessage('WIKI_VARIABLE_ALIASES'))), 'PARAMETERS' => array('PATH_TO_POST' => array('NAME' => GetMessage('WIKI_PATH_TO_POST'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PATH_TO_CATEGORIES' => array('NAME' => GetMessage('WIKI_PATH_TO_CATEGORIES'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PATH_TO_DISCUSSION' => array('NAME' => GetMessage('WIKI_PATH_TO_DISCUSSION'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PATH_TO_HISTORY' => array('NAME' => GetMessage('WIKI_PATH_TO_HISTORY'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PATH_TO_HISTORY_DIFF' => array('NAME' => GetMessage('WIKI_PATH_TO_HISTORY_DIFF'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PATH_TO_USER' => array('NAME' => GetMessage('WIKI_PATH_TO_USER'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => '', 'COLS' => 25, 'PARENT' => 'URL_TEMPLATES'), 'PAGE_VAR' => array('NAME' => GetMessage('WIKI_PAGE_VAR'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => 'title', 'COLS' => 25, 'PARENT' => 'VARIABLE_ALIASES'), 'OPER_VAR' => array('NAME' => GetMessage('WIKI_OPER_VAR'), 'TYPE' => 'STRING', 'MULTIPLE' => 'N', 'DEFAULT' => 'oper', 'COLS' => 25, 'PARENT' => 'VARIABLE_ALIASES'), 'IBLOCK_TYPE' => array('PARENT' => 'BASE', 'NAME' => GetMessage('T_IBLOCK_DESC_LIST_TYPE'), 'TYPE' => 'LIST', 'VALUES' => $arTypes, 'DEFAULT' => 'wiki', '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_NAME' => array('PARENT' => 'BASE', 'NAME' => GetMessage('CP_BND_ELEMENT_NAME'), 'TYPE' => 'STRING', 'DEFAULT' => '={$_REQUEST["title"]}'), 'SET_TITLE' => array(), 'SET_STATUS_404' => array('PARENT' => 'ADDITIONAL_SETTINGS', 'NAME' => GetMessage('CP_BND_SET_STATUS_404'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), 'INCLUDE_IBLOCK_INTO_CHAIN' => array('PARENT' => 'ADDITIONAL_SETTINGS', 'NAME' => GetMessage('T_IBLOCK_DESC_INCLUDE_IBLOCK_INTO_CHAIN'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), 'ADD_SECTIONS_CHAIN' => array('PARENT' => 'ADDITIONAL_SETTINGS', 'NAME' => GetMessage('T_IBLOCK_DESC_ADD_SECTIONS_CHAIN'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N')));
开发者ID:Satariall,项目名称:izurit,代码行数:25,代码来源:.parameters.php

示例11: array

}
if (!CModule::IncludeModule("iblock")) {
    return;
}
if (!CModule::IncludeModule("video")) {
    return;
}
//if(!WIZARD_IS_RERUN)
//{
WizardServices::CopyFile(WIZARD_SERVICE_RELATIVE_PATH . "/public/" . LANGUAGE_ID . "/video", WIZARD_SITE_DIR . "services/video");
$arMenuItem = array(GetMessage("VMENUIT"), WIZARD_SITE_DIR . "services/video/", array(), array(), "");
WizardServices::AddMenuItem(WIZARD_SITE_DIR . "services/.left.menu.php", $arMenuItem, WIZARD_SITE_ID, 11);
//}
$iblockCode = "video-meeting_" . WIZARD_SITE_ID;
$iblockType = "events";
$dbIblockType = CIBlockType::GetList(array(), array("=ID" => $iblockType));
if (!$dbIblockType->Fetch()) {
    $obBlocktype = new CIBlockType();
    $arFields = array("ID" => $iblockType, "SORT" => 500, "IN_RSS" => "N", "SECTIONS" => "Y");
    $arFields["LANG"][LANGUAGE_ID] = array("NAME" => GetMessage("VI_IBLOCK_NAME"));
    $res = $obBlocktype->Add($arFields);
}
$rsIBlock = CIBlock::GetList(array(), array("XML_ID" => $iblockCode, "TYPE" => $iblockType));
$iblockID = false;
if ($arIBlock = $rsIBlock->Fetch()) {
    $iblockID = $arIBlock["ID"];
}
if ($iblockID == false) {
    $rsIBlock = CIBlock::GetList(array(), array("CODE" => "video-meeting", "TYPE" => $iblockType));
    if ($arIBlock = $rsIBlock->Fetch()) {
        $iblockID = $arIBlock["ID"];
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:index.php

示例12: GetMessage

     $strImportErrorMessage .= GetMessage("CICML_NO_LOAD_FILE") . "<br>";
 }
 global $IBLOCK_TYPE_ID;
 $IBLOCK_TYPE_ID = trim(strval($IBLOCK_TYPE_ID));
 if (0 < strlen($IBLOCK_TYPE_ID)) {
     $rsIBlockTypes = CIBlockType::GetByID($IBLOCK_TYPE_ID);
     if (!($arIBlockType = $rsIBlockTypes->Fetch())) {
         $IBLOCK_TYPE_ID = '';
     }
 }
 if (strlen($IBLOCK_TYPE_ID) <= 0) {
     $IBLOCK_TYPE_ID = COption::GetOptionString("catalog", "default_catalog_1c", "");
 }
 if (strlen($IBLOCK_TYPE_ID) <= 0) {
     ClearVars('f_');
     $iblocks = CIBlockType::GetList(array('SORT' => 'ASC'));
     if ($iblocks->ExtractFields("f_")) {
         $IBLOCK_TYPE_ID = $f_ID;
     }
 }
 if (strlen($IBLOCK_TYPE_ID) <= 0) {
     $strImportErrorMessage .= GetMessage("CICML_NO_IBLOCK") . "<br>";
 }
 if ($keepExistingProperties != "Y" && $keepExistingProperties != "N") {
     $keepExistingProperties = COption::GetOptionString("catalog", "keep_existing_properties", CML_KEEP_EXISTING_PROPERTIES ? "Y" : "N");
 }
 $bKeepExistingProperties = $keepExistingProperties == "Y" ? true : false;
 if ($keepExistingData != "Y" && $keepExistingData != "N") {
     $keepExistingData = COption::GetOptionString("catalog", "keep_existing_data", CML_KEEP_EXISTING_DATA ? "Y" : "N");
 }
 //	$bKeepExistingData = (($keepExistingData == "Y") ? true : false);
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:commerceml_g_run.php

示例13: CPHPCache

if ($arParams["ELEMENT_CNT"] == "Y") {
    $bIncCnt = true;
}
$obCache = new CPHPCache();
$lifeTime = $arParams["CACHE_TIME"];
$cacheId = SITE_ID . serialize($arParams) . $USER->GetUserGroupString();
if ($obCache->StartDataCache($lifeTime, $cacheId, "/")) {
    $arFilterDefault = array("ACTIVE" => "Y", "CATALOG_AVAILABLE" => "Y");
    if ($arParams["DEPTH_LEVEL_FINISH"] >= 1) {
        $i = 0;
        $arOrder = array($arParams['IBLOCK_TYPE_SORT_FIELD'] => $arParams['IBLOCK_TYPE_SORT_ORDER']);
        $arFilter = $arParams['IBLOCK_TYPE_SORT_FIELD'] == 'name' ? array('LANGUAGE_ID' => LANGUAGE_ID) : array();
        if (is_set($arParams["IBLOCK_TYPE"]) && !is_array($arParams["IBLOCK_TYPE"])) {
            $arFilter['ID'] = $arParams["IBLOCK_TYPE"];
        }
        $ibTypes = CIBlockType::GetList($arOrder, $arFilter);
        while ($arIbType = $ibTypes->Fetch()) {
            $continue = true;
            if (is_array($arParams["IBLOCK_TYPE"])) {
                if (in_array($arIbType["ID"], $arParams["IBLOCK_TYPE"])) {
                    $continue = false;
                }
                if (!empty($arParams["IBLOCK_TYPE_MASK"])) {
                    foreach ($arParams["IBLOCK_TYPE_MASK"] as $val) {
                        $val = substr($val, 0, -1);
                        if (!empty($val) && strpos($arIbType["ID"], $val) !== false) {
                            $continue = false;
                            break;
                        }
                    }
                }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:component.php

示例14: installDemoData

	function installDemoData()
	{
		if(!CModule::IncludeModule("iblock"))
			return;

		$currentPermissions = CLists::GetPermission();
		$socnet_iblock_type_id = COption::GetOptionString("lists", "socnet_iblock_type_id");
		$isSocnetInstalled = IsModuleInstalled('socialnetwork');

		$arTypes = array();
		if (empty($currentPermissions))
		{
			$arTypes[] = array(
				"ID" => "lists",
				"SECTIONS" => "Y",
				"IN_RSS" => "N",
				"SORT" => 80,
				"LANG" => array(),
			);
		}

		if ($isSocnetInstalled && strlen($socnet_iblock_type_id) <= 0)
		{
			$arTypes[] = array(
				"ID" => "lists_socnet",
				"SECTIONS" => "Y",
				"IN_RSS" => "N",
				"SORT" => 83,
				"LANG" => array(),
			);
		}

		$arLanguages = array();
		if (!empty($arTypes))
		{
			$rsLanguage = CLanguage::GetList($by, $order, array());
			while ($arLanguage = $rsLanguage->Fetch())
			{
				$arLanguages[] = $arLanguage["LID"];
			}
		}

		foreach ($arTypes as $arType)
		{
			$dbType = CIBlockType::GetList(array(), array("=ID" => $arType["ID"]));
			if (!$dbType->Fetch())
			{
				foreach($arLanguages as $languageID)
				{
					IncludeModuleLangFile(__FILE__, $languageID);
					$code = strtoupper($arType["ID"]);
					$arType["LANG"][$languageID]["NAME"] = GetMessage($code."_TYPE_NAME");
					$arType["LANG"][$languageID]["ELEMENT_NAME"] = GetMessage($code."_ELEMENT_NAME");
					if ($arType["SECTIONS"] == "Y")
						$arType["LANG"][$languageID]["SECTION_NAME"] = GetMessage($code."_SECTION_NAME");
				}
				$iblockType = new CIBlockType;
				$iblockType->Add($arType);
			}
		}

		if (empty($currentPermissions))
		{
			CLists::SetPermission('lists', array(1));
		}

		if ($isSocnetInstalled && strlen($socnet_iblock_type_id) <= 0)
		{
			COption::SetOptionString("lists", "socnet_iblock_type_id", "lists_socnet");
			CLists::EnableSocnet(true);
		}
	}
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:72,代码来源:index.php

示例15: switch

            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                $DB->StartTransaction();
                if (!CIBlockType::Delete($ID)) {
                    $DB->Rollback();
                    $lAdmin->AddGroupError(GetMessage("IBLOCK_TYPE_ADMIN_ERR_DEL") . " (&quot;" . htmlspecialcharsbx($ID) . "&quot;)", $ID);
                }
                $DB->Commit();
                break;
        }
    }
}
// Fill list with data
$rsData = CIBlockType::GetList(array($by => $order), $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// Set page navigation
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("IBLOCK_TYPE_ADMIN_NAV")));
// List headers/columns
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "NAME", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_NAME"), "default" => true), array("id" => "SORT", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_SORT"), "sort" => "sort", "default" => true, "align" => "right"), array("id" => "SECTIONS", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_SECT"), "default" => true, "align" => "center"), array("id" => "IN_RSS", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_RSS"), "default" => true, "align" => "center"), array("id" => "EDIT_FILE_BEFORE", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_EDIT_BEF")), array("id" => "EDIT_FILE_AFTER", "content" => GetMessage("IBLOCK_TYPE_ADMIN_COL_EDIT_AFT"))));
// Build elements list
while ($arRes = $rsData->NavNext(true, "f_")) {
    $ibtypelang = CIBlockType::GetByIDLang($f_ID, LANGUAGE_ID);
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $row->AddViewField("NAME", $ibtypelang["NAME"]);
    if ($USER->IsAdmin()) {
        $row->AddInputField("SORT");
        $row->AddCheckField("SECTIONS");
        $row->AddCheckField("IN_RSS");
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:iblock_type_admin.php


注:本文中的CIBlockType::GetList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。