• Модуль: documentgenerator
  • Путь к файлу: ~/bitrix/modules/documentgenerator/lib/controller/numerator.php
  • Класс: BitrixDocumentGeneratorControllerNumerator
  • Вызов: Numerator::deleteAction
public function deleteAction(BitrixMainNumeratorNumerator $numerator, CRestServer $restServer = null)
{
	$numeratorId = $this->getNumeratorId($numerator);
	if($restServer && !$this->checkAccess($numeratorId))
	{
		$this->errorCollection[] = new Error('Access denied', static::ERROR_ACCESS_DENIED);
		return null;
	}
	$deleteResult = $numerator::delete($numeratorId);
	if(!$deleteResult->isSuccess())
	{
		$this->errorCollection = $deleteResult->getErrorCollection();
	}
	else
	{
		if($restServer)
		{
			$restNumeratorIds = $this->getRestNumeratorIds();
			unset($restNumeratorIds[array_search($numeratorId, $restNumeratorIds)]);
			$this->setRestNumeratorIds($restNumeratorIds);
		}
	}

	return null;
}