CCrmEntityHelper::applySubQueryBasedFiltersWrapper

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmEntityHelper
  4. applySubQueryBasedFiltersWrapper
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/entity_helper.php
  • Класс: \CCrmEntityHelper
  • Вызов: CCrmEntityHelper::applySubQueryBasedFiltersWrapper
static function applySubQueryBasedFiltersWrapper(
	int $entityTypeId,
	string $gridId,
	array $extras,
	array &$arFilter,
	$entityFilter
): void
{
	if (!\CCrmOwnerType::IsDefined($entityTypeId))
	{
		return;
	}

	if (isset($entityFilter))
	{
		$provider = $entityFilter->getEntityDataProvider();
	}
	else
	{
		$filterFactory = Service\Container::getInstance()->getFilterFactory();
		$provider = $filterFactory->getDataProvider($filterFactory::getSettingsByGridId($entityTypeId, $gridId));
	}

	if ($provider instanceof EntityDataProvider)
	{
		$provider->applyCounterFilter($entityTypeId, $arFilter, $extras);

		$provider->applyActivityResponsibleFilter($entityTypeId, $arFilter);
	}

	unset($filterFactory, $provider);
}

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