CCrmRequisiteBankDetailRestProxy::innerDelete

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRequisiteBankDetailRestProxy
  4. innerDelete
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRequisiteBankDetailRestProxy
  • Вызов: CCrmRequisiteBankDetailRestProxy::innerDelete
protected function innerDelete($ID, &$errors, array $params = null)
{
	$r = $this->getById($ID);
	if(!is_array($r))
	{
		$errors[] = "The RequisiteBankDetail with ID '{$ID}' is not found";
		return false;
	}

	if(!EntityBankDetail::checkDeletePermissionOwnerEntity($r['ENTITY_TYPE_ID'], $r['ENTITY_ID']))
	{
		$errors[] = 'Access denied.';
		return false;
	}

	$entity = self::getEntity();
	$result = $entity->delete($ID);
	if(!$result->isSuccess())
	{
		$errors[] = $result->getErrors();
	}

	return $result->isSuccess();
}

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