本文整理汇总了PHP中CBPDocument::deleteWorkflowTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP CBPDocument::deleteWorkflowTemplate方法的具体用法?PHP CBPDocument::deleteWorkflowTemplate怎么用?PHP CBPDocument::deleteWorkflowTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBPDocument
的用法示例。
在下文中一共展示了CBPDocument::deleteWorkflowTemplate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteDataIblock
public static function deleteDataIblock($iblockId)
{
$iblockId = intval($iblockId);
$documentType = array('lists', get_called_class(), self::generateDocumentType($iblockId));
$errors = array();
$templateObject = CBPWorkflowTemplateLoader::getList(array('ID' => 'DESC'), array('DOCUMENT_TYPE' => $documentType), false, false, array('ID'));
while ($template = $templateObject->fetch()) {
CBPDocument::deleteWorkflowTemplate($template['ID'], $documentType, $errors);
}
}
示例2: processActionDelete
protected function processActionDelete()
{
$errorsTemporary = array();
foreach ($this->arParams['DOCUMENT_DATA'] as $nameModule => $data) {
$result = CBPWorkflowTemplateLoader::getList(array('name' => 'asc'), array('DOCUMENT_TYPE' => $data['DOCUMENT_TYPE'], 'ID' => $this->request->getQuery('ID')), false, false, array('ID'));
$availabilityTemplate = $result->fetch();
if (!empty($availabilityTemplate)) {
CBPDocument::deleteWorkflowTemplate($this->request->getQuery('ID'), $data['DOCUMENT_TYPE'], $errorsTemporary);
}
}
if (empty($errorsTemporary)) {
$requestBackUrl = $this->request->getQuery('back_url');
$url = !empty($requestBackUrl) ? $requestBackUrl : $this->getApplication()->getCurPageParam('', array('action', 'sessid', 'ID'));
LocalRedirect($url);
} elseif (!empty($errorsTemporary)) {
$errors = array();
foreach ($errorsTemporary as $e) {
$errors[] = array('id' => 'delete_error', 'text' => $e['message']);
}
$e = new CAdminException($errors);
ShowError($e->getString());
}
}