• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/timeline/comment.php
  • Класс: Bitrix\Crm\Controller\Timeline\Comment
  • Вызов: Comment::assertValidCommentRecord
private function assertValidCommentRecord(?int $commentId): bool
{
	if (!isset($commentId))
	{
		$this->addError(ErrorCode::getNotFoundError());

		return false;
	}

	$comment = $this->load($commentId);
	if (!isset($comment))
	{
		$this->addError(ErrorCode::getNotFoundError());

		return false;
	}

	$loadedBindings = $this->loadBindings($commentId);
	if (count($loadedBindings) === 0)
	{
		$this->addError(ErrorCode::getNotFoundError());

		return false;
	}

	return true;
    }