CCrmBizProc::Delete

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmBizProc
  4. Delete
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_bizproc.php
  • Класс: \CCrmBizProc
  • Вызов: CCrmBizProc::Delete
public function Delete($ID, $arEntityAttr = null, array $arParameters = array())
{
	if(!CModule::IncludeModule('bizproc') || !CBPRuntime::isFeatureEnabled())
		return true;

	$userID = CCrmSecurityHelper::GetCurrentUserID();
	$bDeleteError = !CBPDocument::CanUserOperateDocument(
		CBPCanUserOperateOperation::WriteDocument,
		$userID,
		array('crm', $this->sDocument, $this->sEntityType.'_'.$ID),
		array_merge(
			array(
				'UserGroups' => $this->arCurrentUserGroups,
				'UserIsAdmin' => CCrmPerms::IsAdmin($userID),
				'CRMEntityAttr' => $arEntityAttr
			),
			$arParameters
		)
	);
	if (!$bDeleteError)
	{
		return $this->ProcessDeletion($ID);
	}
	return true;
}

Добавить комментарий