CCrmMeasureRestProxy::innerDelete

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmMeasureRestProxy
  4. innerDelete
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmMeasureRestProxy
  • Вызов: CCrmMeasureRestProxy::innerDelete
protected function innerDelete($ID, &$errors, array $params = null)
{
	if (!CModule::IncludeModule('catalog'))
	{
		$errors[] = 'The Commercial Catalog module is not installed.';
		return false;
	}

	$userPermissions = CCrmAuthorizationHelper::GetUserPermissions();
	if (!CCrmAuthorizationHelper::CheckConfigurationUpdatePermission($userPermissions))
	{
		$errors[] = 'Access denied.';
		return false;
	}
	unset($userPermissions);

	$result = CCatalogMeasure::delete($ID);
	if($result !== true)
		$errors[] = 'Error when deleting unit of measurement.';

	return $result;
}

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