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


PHP CBPDocument::onDocumentDelete方法代码示例

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


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

示例1: OnAfterIBlockElementDelete

 public function OnAfterIBlockElementDelete($fields)
 {
     $errors = array();
     if (Loader::includeModule('socialnetwork')) {
         $states = CBPStateService::getDocumentStates(array('lists', get_called_class(), $fields['ID']));
         foreach ($states as $workflowId => $state) {
             $sourceId = CBPStateService::getWorkflowIntegerId($workflowId);
             $resultQuery = CSocNetLog::getList(array(), array('EVENT_ID' => 'lists_new_element', 'SOURCE_ID' => $sourceId), false, false, array('ID'));
             while ($log = $resultQuery->fetch()) {
                 CSocNetLog::delete($log['ID']);
             }
         }
     }
     CBPDocument::onDocumentDelete(array('lists', get_called_class(), $fields['ID']), $errors);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:15,代码来源:bizprocdocument.php

示例2: deleteWorkflowsFile

 public static function deleteWorkflowsFile($fileId)
 {
     $documentData = array('DISK' => \Bitrix\Disk\BizProcDocument::getDocumentComplexId($fileId), 'WEBDAV' => \Bitrix\Disk\BizProcDocumentCompatible::getDocumentComplexId($fileId));
     $errors = array();
     foreach ($documentData as $nameModule => $data) {
         \CBPDocument::onDocumentDelete($data, $errors);
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:8,代码来源:bizprocdocument.php

示例3: OnAfterIBlockElementDelete

 public function OnAfterIBlockElementDelete($fields)
 {
     if (CModule::includeModule('bizproc')) {
         $errors = array();
         $iblockType = COption::getOptionString("lists", "livefeed_iblock_type_id");
         $iblockQuery = CIBlock::getList(array(), array('ID' => $fields['IBLOCK_ID']));
         if ($iblock = $iblockQuery->fetch()) {
             $iblockType = $iblock["IBLOCK_TYPE_ID"];
         }
         $states = CBPStateService::getDocumentStates(BizprocDocument::getDocumentComplexId($iblockType, $fields['ID']));
         $listWorkflowId = array();
         foreach ($states as $workflowId => $state) {
             $listWorkflowId[] = $workflowId;
         }
         self::deleteSocnetLog($listWorkflowId);
         CBPDocument::onDocumentDelete(BizprocDocument::getDocumentComplexId($iblockType, $fields['ID']), $errors);
     }
     $propertyQuery = CIBlockElement::getProperty($fields['IBLOCK_ID'], $fields['ID'], 'sort', 'asc', array('ACTIVE' => 'Y'));
     while ($property = $propertyQuery->fetch()) {
         $userType = \CIBlockProperty::getUserType($property['USER_TYPE']);
         if (array_key_exists('DeleteAllAttachedFiles', $userType)) {
             call_user_func_array($userType['DeleteAllAttachedFiles'], array($fields['ID']));
         }
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:25,代码来源:lists.php


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