...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integrity/dedupeconfigcleaner.php
- Класс: Bitrix\Crm\Integrity\DedupeConfigCleaner
- Вызов: DedupeConfigCleaner::getListByEntityTypes
protected function getListByEntityTypes(array $entityTypeIds): Main\DB\Result { $connection = Application::getConnection(); $helper = $connection->getSqlHelper(); $conditions = []; $fieldNameSql = '`NAME`'; foreach ($entityTypeIds as $entityTypeId) { $entityTypeNameSql = mb_strtolower(CCrmOwnerType::ResolveName($entityTypeId)); $nameValueSql = $helper->forSql("{$entityTypeNameSql}_dedupe_wizard"); $conditions[] = "$fieldNameSql = '$nameValueSql'"; } $nameConditionSql = empty($conditions) ? '' : ' AND (' . implode(' OR ', $conditions) . ')'; $categorySql = $helper->forSql(DedupeConfig::OPTION_KEY); return $connection->query( "SELECT ID, USER_ID, `NAME` FROM b_user_option WHERE CATEGORY = '$categorySql'$nameConditionSql" ); }