Comment::detectBindings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Comment
  4. detectBindings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/timeline/comment.php
  • Класс: Bitrix\Crm\Controller\Timeline\Comment
  • Вызов: Comment::detectBindings
private function detectBindings(int $commentId, int $ownerId, int $ownerTypeId): array
{
	$loadedBindings = $this->loadBindings($commentId);
	$bindings = [];
	$isBindingsExist = false;
	foreach ($loadedBindings as $bindingData)
	{
		if (
			(int)$bindingData['ENTITY_TYPE_ID'] === $ownerTypeId
			&& (int)$bindingData['ENTITY_ID'] === $ownerId
		)
		{
			$isBindingsExist = true;
		}

		$bindings[] = $bindingData;
	}

	return [$isBindingsExist, $bindings];
}

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