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


PHP CIBlockElement::CancelWFSetMove方法代码示例

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


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

示例1: ImportElement

 function ImportElement($arXMLElement, &$counter, $bWF, $arParent)
 {
     global $USER;
     $USER_ID = is_object($USER) ? intval($USER->GetID()) : 0;
     $arElement = array("ACTIVE" => "Y", "PROPERTY_VALUES" => array());
     if (isset($arXMLElement[$this->mess["IBLOCK_XML2_VERSION"]])) {
         $arElement["TMP_ID"] = $arXMLElement[$this->mess["IBLOCK_XML2_VERSION"]];
     } else {
         $arElement["TMP_ID"] = $this->GetElementCRC($arXMLElement);
     }
     if (isset($arXMLElement[$this->mess["IBLOCK_XML2_ID"]])) {
         $arElement["XML_ID"] = $arXMLElement[$this->mess["IBLOCK_XML2_ID"]];
     }
     $obElement = new CIBlockElement();
     $obElement->CancelWFSetMove();
     $rsElement = $obElement->GetList(array("ID" => "asc"), array("=XML_ID" => $arElement["XML_ID"], "IBLOCK_ID" => $this->next_step["IBLOCK_ID"]), false, false, array("ID", "TMP_ID", "ACTIVE", "CODE", "PREVIEW_PICTURE", "DETAIL_PICTURE"));
     $bMatch = false;
     if ($arDBElement = $rsElement->Fetch()) {
         $bMatch = $arElement["TMP_ID"] == $arDBElement["TMP_ID"];
     }
     if ($bMatch && $this->use_crc) {
         //Check Active flag in XML is not set to false
         if ($this->CheckIfElementIsActive($arXMLElement)) {
             //In case element is not active in database we have to activate it and its offers
             if ($arDBElement["ACTIVE"] != "Y") {
                 $obElement->Update($arDBElement["ID"], array("ACTIVE" => "Y"), $bWF);
                 $this->ChangeOffersStatus($arDBElement["ID"], "Y", $bWF);
                 $counter["UPD"]++;
             }
         }
         $arElement["ID"] = $arDBElement["ID"];
     } elseif (isset($arXMLElement[$this->mess["IBLOCK_XML2_NAME"]])) {
         if ($arDBElement) {
             if ($arDBElement["PREVIEW_PICTURE"] > 0) {
                 $this->arElementFilesId["PREVIEW_PICTURE"] = array($arDBElement["PREVIEW_PICTURE"]);
             }
             if ($arDBElement["DETAIL_PICTURE"] > 0) {
                 $this->arElementFilesId["DETAIL_PICTURE"] = array($arDBElement["DETAIL_PICTURE"]);
             }
             $rsProperties = $obElement->GetProperty($this->next_step["IBLOCK_ID"], $arDBElement["ID"], "sort", "asc");
             while ($arProperty = $rsProperties->Fetch()) {
                 if (!array_key_exists($arProperty["ID"], $arElement["PROPERTY_VALUES"])) {
                     $arElement["PROPERTY_VALUES"][$arProperty["ID"]] = array("bOld" => true);
                 }
                 $arElement["PROPERTY_VALUES"][$arProperty["ID"]][$arProperty['PROPERTY_VALUE_ID']] = array("VALUE" => $arProperty['VALUE'], "DESCRIPTION" => $arProperty["DESCRIPTION"]);
                 if ($arProperty["PROPERTY_TYPE"] == "F" && $arProperty["VALUE"] > 0) {
                     $this->arElementFilesId[$arProperty["ID"]][] = $arProperty["VALUE"];
                 }
             }
         }
         if ($this->bCatalog && $this->next_step["bOffer"]) {
             $p = strpos($arXMLElement[$this->mess["IBLOCK_XML2_ID"]], "#");
             if ($p !== false) {
                 $link_xml_id = substr($arXMLElement[$this->mess["IBLOCK_XML2_ID"]], 0, $p);
             } else {
                 $link_xml_id = $arXMLElement[$this->mess["IBLOCK_XML2_ID"]];
             }
             $arElement["PROPERTY_VALUES"][$this->PROPERTY_MAP["CML2_LINK"]] = array("n0" => array("VALUE" => $this->GetElementByXML_ID($this->arProperties[$this->PROPERTY_MAP["CML2_LINK"]]["LINK_IBLOCK_ID"], $link_xml_id), "DESCRIPTION" => false));
         }
         if (isset($arXMLElement[$this->mess["IBLOCK_XML2_NAME"]])) {
             $arElement["NAME"] = $arXMLElement[$this->mess["IBLOCK_XML2_NAME"]];
         }
         if (isset($arXMLElement[$this->mess["IBLOCK_XML2_DELETE_MARK"]])) {
             $value = $arXMLElement[$this->mess["IBLOCK_XML2_DELETE_MARK"]];
             $arElement["ACTIVE"] = $value == "true" || intval($value) ? "N" : "Y";
         }
         if (array_key_exists($this->mess["IBLOCK_XML2_BX_TAGS"], $arXMLElement)) {
             $arElement["TAGS"] = $arXMLElement[$this->mess["IBLOCK_XML2_BX_TAGS"]];
         }
         if (array_key_exists($this->mess["IBLOCK_XML2_DESCRIPTION"], $arXMLElement)) {
             if (strlen($arXMLElement[$this->mess["IBLOCK_XML2_DESCRIPTION"]]) > 0) {
                 $arElement["DETAIL_TEXT"] = $arXMLElement[$this->mess["IBLOCK_XML2_DESCRIPTION"]];
             } else {
                 $arElement["DETAIL_TEXT"] = "";
             }
             if (preg_match('/<[a-zA-Z0-9]+.*?>/', $arElement["DETAIL_TEXT"])) {
                 $arElement["DETAIL_TEXT_TYPE"] = "html";
             } else {
                 $arElement["DETAIL_TEXT_TYPE"] = "text";
             }
         }
         if (array_key_exists($this->mess["IBLOCK_XML2_FULL_TITLE"], $arXMLElement)) {
             if (strlen($arXMLElement[$this->mess["IBLOCK_XML2_FULL_TITLE"]]) > 0) {
                 $arElement["PREVIEW_TEXT"] = $arXMLElement[$this->mess["IBLOCK_XML2_FULL_TITLE"]];
             } else {
                 $arElement["PREVIEW_TEXT"] = "";
             }
             if (preg_match('/<[a-zA-Z0-9]+.*?>/', $arElement["PREVIEW_TEXT"])) {
                 $arElement["PREVIEW_TEXT_TYPE"] = "html";
             } else {
                 $arElement["PREVIEW_TEXT_TYPE"] = "text";
             }
         }
         if (array_key_exists($this->mess["IBLOCK_XML2_INHERITED_TEMPLATES"], $arXMLElement)) {
             $arElement["IPROPERTY_TEMPLATES"] = array();
             foreach ($arXMLElement[$this->mess["IBLOCK_XML2_INHERITED_TEMPLATES"]] as $TEMPLATE) {
                 $id = $TEMPLATE[$this->mess["IBLOCK_XML2_ID"]];
                 $template = $TEMPLATE[$this->mess["IBLOCK_XML2_VALUE"]];
                 if (strlen($id) > 0 && strlen($template) > 0) {
                     $arElement["IPROPERTY_TEMPLATES"][$id] = $template;
//.........这里部分代码省略.........
开发者ID:nycmic,项目名称:bittest,代码行数:101,代码来源:cml2.php

示例2: GetMessage

         $bFieldsPres = True;
         break;
     }
 }
 if (!$bFieldsPres) {
     $strError .= GetMessage("IBLOCK_ADM_IMP_NO_FIELDS") . "<br>";
 }
 if (strlen($strError) <= 0) {
     $csvFile->SetPos($CUR_FILE_POS);
     if ($CUR_FILE_POS <= 0 && $bFirstHeaderTmp) {
         $arRes = $csvFile->Fetch();
     }
     $io = CBXVirtualIo::GetInstance();
     $bs = new CIBlockSection();
     $el = new CIBlockElement();
     $el->CancelWFSetMove();
     $tmpid = md5(uniqid(""));
     $arIBlockProperty = array();
     $bThereIsGroups = False;
     if ($CUR_FILE_POS > 0 && is_set($_SESSION, $CUR_LOAD_SESS_ID)) {
         if (is_set($_SESSION[$CUR_LOAD_SESS_ID], "tmpid")) {
             $tmpid = $_SESSION[$CUR_LOAD_SESS_ID]["tmpid"];
         }
         if (is_set($_SESSION[$CUR_LOAD_SESS_ID], "line_num")) {
             $line_num = intval($_SESSION[$CUR_LOAD_SESS_ID]["line_num"]);
         }
         if (is_set($_SESSION[$CUR_LOAD_SESS_ID], "correct_lines")) {
             $correct_lines = intval($_SESSION[$CUR_LOAD_SESS_ID]["correct_lines"]);
         }
         if (is_set($_SESSION[$CUR_LOAD_SESS_ID], "error_lines")) {
             $error_lines = intval($_SESSION[$CUR_LOAD_SESS_ID]["error_lines"]);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:data_import.php


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