本文整理汇总了PHP中CIBlockType类的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockType类的具体用法?PHP CIBlockType怎么用?PHP CIBlockType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CIBlockType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:28,代码来源:cexportproprofile.php
示例2: 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
示例3: deleteIblockType
public function deleteIblockType($typeId)
{
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
if (\CIBlockType::Delete($typeId)) {
return true;
}
$this->throwException(__METHOD__, 'Could not delete iblock type %s', $typeId);
}
开发者ID:andreyryabin,项目名称:sprint.migration,代码行数:8,代码来源:IblockHelper.php
示例4: 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
示例5: 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
示例6: 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
示例7: CheckIBlockTypeID
function CheckIBlockTypeID($strIBlockTypeID, $strNewIBlockTypeID, $strNeedAdd)
{
$arResult = false;
$strNeedAdd = 'Y' == $strNeedAdd ? 'Y' : 'N';
$strNewIBlockTypeID = trim($strNewIBlockTypeID);
$strIBlockTypeID = trim($strIBlockTypeID);
if ('Y' == $strNeedAdd) {
$obIBlockType = new CIBlockType();
if ('' != $strNewIBlockTypeID) {
$rsIBlockTypes = CIBlockType::GetByID($strNewIBlockTypeID);
if ($arIBlockType = $rsIBlockTypes->Fetch()) {
$arResult = array('RESULT' => 'OK', 'VALUE' => $strNewIBlockTypeID);
} else {
$arFields = array('ID' => $strNewIBlockTypeID, 'SECTIONS' => 'N', 'IN_RSS' => 'N', 'SORT' => 500);
$rsLanguages = CLanguage::GetList($by = "sort", $order = "desc", array('ACTIVE' => 'Y'));
while ($arLanguage = $rsLanguages->Fetch()) {
$arFields['LANG'][$arLanguage['LID']]['NAME'] = $strNewIBlockTypeID;
}
$mxOffersType = $obIBlockType->Add($arFields);
if (false == $mxOffersType) {
$arResult = array('RESULT' => 'ERROR', 'MESSAGE' => $obIBlockType->LAST_ERROR);
} else {
$arResult = array('RESULT' => 'OK', 'VALUE' => $strNewIBlockTypeID);
}
}
} else {
$arResult = array('RESULT' => 'ERROR', 'MESSAGE' => GetMessage('IB_E_OF_ERR_NEW_IBLOCK_TYPE_ABSENT'));
}
} else {
if ('' == $strIBlockTypeID) {
$arResult = array('RESULT' => 'ERROR', 'MESSAGE' => GetMessage('IB_E_OF_ERR_IBLOCK_TYPE_ABSENT'));
} else {
$rsIBlockTypes = CIBlockType::GetByID($strIBlockTypeID);
if (!($arIBlockType = $rsIBlockTypes->Fetch())) {
$arResult = array('RESULT' => 'ERROR', 'MESSAGE' => GetMessage('IB_E_OF_ERR_IBLOCK_TYPE_BAD'));
} else {
$arResult = array('RESULT' => 'OK', 'VALUE' => $strIBlockTypeID);
}
}
}
return $arResult;
}
开发者ID:Satariall,项目名称:izurit,代码行数:42,代码来源:iblock_edit.php
示例8: CheckIBlockType
function CheckIBlockType($ID, $SECTIONS = "Y")
{
$obType = new CIBlockType();
$rsType = $obType->GetByID($ID);
if ($arType = $rsType->Fetch()) {
return $arType["ID"];
} else {
$arFields = array("ID" => $ID, "SECTIONS" => $SECTIONS, "LANG" => array());
$rsLanguages = CLanguage::GetList($by = "sort", $order = "asc");
while ($arLanguage = $rsLanguages->Fetch()) {
$MY_MESS = IncludeModuleLangFile(__FILE__, $arLanguage["LID"], true);
$arFields["LANG"][$arLanguage["LID"]] = array("NAME" => $MY_MESS["IBLOCK_INSTALL_" . strtoupper($ID) . "_NAME"], "SECTION_NAME" => $MY_MESS["IBLOCK_INSTALL_" . strtoupper($ID) . "_SECTIONS_NAME"], "ELEMENT_NAME" => $MY_MESS["IBLOCK_INSTALL_" . strtoupper($ID) . "_ELEMENTS_NAME"]);
}
$result = $obType->Add($arFields);
if ($result) {
return $result;
} else {
return false;
}
}
}
开发者ID:Satariall,项目名称:izurit,代码行数:21,代码来源:step2.php
示例9: 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
示例10: applySnapshot
public function applySnapshot($data, $dbVersion = null)
{
$iblockData = $this->handleNullValues($data['iblock']);
$typeData = $this->handleNullValues($data['type']);
$res = new ApplyResult();
$type = new \CIBlockType();
if (!\CIBlockType::GetByID($typeData['ID'])->Fetch()) {
$res->setSuccess($type->Add($typeData));
} else {
$res->setSuccess($type->Update($typeData['ID'], $typeData));
}
if (!$res->isSuccess()) {
return $res->setMessage($type->LAST_ERROR);
}
$extId = $iblockData['ID'];
if ($dbVersion) {
$id = $this->getCurrentVersionId($extId, $dbVersion);
} else {
$id = $extId;
}
if (!$dbVersion && !IblockTable::getById($id)->fetch()) {
$addRes = IblockTable::add(array('ID' => $id, 'IBLOCK_TYPE_ID' => $typeData['ID'], 'NAME' => 'add'));
if (!$addRes->isSuccess()) {
throw new \Exception('add iblock error ' . implode(', ', $addRes->getErrorMessages()));
}
}
$iblock = new \CIBlock();
if ($id && ($currentData = IblockTable::getById($id)->fetch())) {
$iblockData['PICTURE'] = $currentData['PICTURE'];
$res->setSuccess((bool) $iblock->Update($id, $iblockData));
} else {
unset($iblockData['PICTURE']);
$res->setSuccess((bool) ($id = $iblock->Add($iblockData)));
$this->registerCurrentVersionId($id, $this->getReferenceValue($extId, $dbVersion));
}
$res->setId($id);
return $res->setMessage($iblock->LAST_ERROR);
}
开发者ID:ASDAFF,项目名称:bitrix-module-migrations,代码行数:38,代码来源:iblockhandler.php
示例11: deleteIBlockType
/**
* @param string $id
*
* @throws MigrationException
*/
protected function deleteIBlockType($id)
{
/** @global $APPLICATION \CMain */
/** @global $DB \CDatabase */
global $APPLICATION;
global $DB;
$DB->StartTransaction();
if (\CIBlockType::Delete($id)) {
$DB->Commit();
} else {
$DB->Rollback();
throw new MigrationException($APPLICATION->GetException());
}
}
开发者ID:rocko61rus,项目名称:QuetzalTools,代码行数:19,代码来源:AbstractIBlockMigration.php
示例12: 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
示例13: Delete
/**
* Delete
* @param $IblockTypeCode
* @return bool
* @throws \Exception
*/
public static function Delete($IblockTypeCode)
{
$Iblock = new \CIBlock();
$iblockEl = new \CIBlockElement();
$dbIblock = $Iblock->GetList(array(), array('TYPE' => $IblockTypeCode));
while ($dbRow = $dbIblock->Fetch()) {
$iblockElDbRes = $iblockEl->GetList(array(), array('IBLOCK_ID' => $dbRow['ID']));
if ($iblockElDbRes !== false && $iblockElDbRes->SelectedRowsCount()) {
throw new BimException('Can not delete iblock type: iblock id =' . $dbRow['ID'] . ' have elements');
}
}
if (!\CIBlockType::Delete($IblockTypeCode)) {
throw new BimException('Delete iblock type error!');
}
return true;
}
开发者ID:cjp2600,项目名称:bim-core,代码行数:22,代码来源:IblockTypeIntegrate.php
示例14: 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
示例15: checkParams
/**
* Абстрактный метод проверки передаваемых параметров
*
* checkParams
* @param array $params
* @return mixed|void
* @throws \Exception
*/
public function checkParams($params)
{
$CIblockType = new \CIBlockType();
if (!isset($params['iblockTypeId']) || !strlen($params['iblockTypeId'])) {
throw new BimException('В параметрах не найден iblockTypeId');
}
$iblockTypeDbRes = $CIblockType->GetByID($params['iblockTypeId']);
if ($iblockTypeDbRes === false || !$iblockTypeDbRes->SelectedRowsCount()) {
throw new BimException('В системе не найден тип инфоблока с id = ' . $params['iblockTypeId']);
}
$this->ownerItemDbData = $iblockTypeDbRes->Fetch();
}
开发者ID:cjp2600,项目名称:bim-core,代码行数:20,代码来源:IblockType.php
示例16: array
die;
}
/**
* PIS - parameter image slider
*/
if (!CModule::IncludeModule("iblock")) {
return;
}
$arIblockType = array();
//типы инфоблоков
$arIBlocks = array();
//инфоблоки
$arISections = array();
//разделы
//Выбираем все типы инфоблоков/////
$dbIBlockType = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
while ($arIBlockType = $dbIBlockType->GetNext()) {
if ($arIBlockTypeLang = CIBlockType::GetByIDLang($arIBlockType["ID"], LANGUAGE_ID)) {
$arIblockType[$arIBlockType["ID"]] = "[" . $arIBlockType["ID"] . "] " . $arIBlockTypeLang["NAME"];
}
}
///Выбираем ифноблоки для выбранного типа/////
$dbIBlock = CIBlock::GetList(array(), array('TYPE' => $arCurrentValues["IBLOCK_TYPE_ID"], 'ACTIVE' => 'Y'), true);
while ($arProp = $dbIBlock->GetNext()) {
$arIBlocks[$arProp["ID"]] = "[" . $arProp["ID"] . "]" . $arProp["NAME"];
}
//////////////////////////////////////////
$arComponentParameters = array("GROUPS" => "", "PARAMETERS" => array("IBLOCK_TYPE_ID" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_TYPE_ID_NAME_PIS"), "REFRESH" => "Y", "ADDITIONAL_VALUES" => "Y", "TYPE" => "LIST", "VALUES" => $arIblockType), "CACHE_TIME" => array()));
if (!empty($arIBlocks)) {
$arComponentParameters["PARAMETERS"]["IBLOCK_ID"] = array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_ID_NAME_PIS"), "REFRESH" => "Y", "TYPE" => "LIST", "VALUES" => $arIBlocks);
}
开发者ID:lenchv,项目名称:meblya,代码行数:31,代码来源:.parameters.php
示例17: 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;
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:menu.php
示例18: getIblockType
public function getIblockType($id)
{
return \CIBlockType::GetList(array('SORT' => 'ASC'), array('CHECK_PERMISSIONS' => 'N', '=ID' => $id))->Fetch();
}
开发者ID:Hawkart,项目名称:megatv,代码行数:4,代码来源:IblockHelper.php
示例19: strval
$IBLOCK_TYPE_ID = '';
if (isset($filter_iblock_type_id) && !is_array($filter_iblock_type_id)) {
$filter_iblock_type_id = strval($filter_iblock_type_id);
if ('' != $filter_iblock_type_id) {
$IBLOCK_TYPE_ID = $filter_iblock_type_id;
}
}
if ('' == $IBLOCK_TYPE_ID && isset($_REQUEST['IBLOCK_TYPE_ID']) && !is_array($_REQUEST['IBLOCK_TYPE_ID'])) {
$strTempo = strval($_REQUEST['IBLOCK_TYPE_ID']);
if ('' != $strTempo) {
$IBLOCK_TYPE_ID = $strTempo;
}
unset($strTempo);
}
if ('' !== $IBLOCK_TYPE_ID) {
$arIBlockType = CIBlockType::GetByIDLang($IBLOCK_TYPE_ID, LANGUAGE_ID);
if (!$arIBlockType) {
$IBLOCK_TYPE_ID = '';
$APPLICATION->AuthForm(GetMessage("BX_MOD_CATALOG_ADMIN_CIS_BAD_IBLOCK_TYPE_ID"));
}
}
$APPLICATION->SetTitle(GetMessage("BX_MOD_CATALOG_ADMIN_CIS_TITLE"));
$arFilterFields = array('filter_iblock_type_id');
$oSort = new CAdminSorting($sTableID, "NAME", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);
$lAdmin->InitFilter($arFilterFields);
$arFilter = array("IBLOCK_TYPE_ID" => $IBLOCK_TYPE_ID, "CHECK_PERMISSIONS" => "Y", "MIN_PERMISSION" => "R");
$arHeader = array();
$arHeader[] = array("id" => "ID", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_ID"), "sort" => "ID", "align" => "right", "default" => true);
$arHeader[] = array("id" => "IBLOCK_TYPE_ID", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_IBLOCK_TYPE_ID"), "sort" => "IBLOCK_TYPE_ID", "default" => true);
$arHeader[] = array("id" => "NAME", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_NAME"), "sort" => "NAME", "default" => true);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:cat_iblock_search.php
示例20: 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
注:本文中的CIBlockType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论