...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/webform/internals/formcounter.php
- Класс: Bitrix\Crm\WebForm\Internals\FormCounterTable
- Вызов: FormCounterTable::incCounters
static function incCounters($formId, array $counters) { $updateFields = array(); $counterId = static::getCurrentFormCounter($formId); foreach($counters as $key => $value) { if(is_numeric($key)) { $counterName = $value; $incValue = '1'; } else { $counterName = $key; $incValue = (string) $value; } $updateFields[$counterName] = new \Bitrix\Main\DB\SqlExpression('?# + ' . $incValue, $counterName); } $result = static::update($counterId, $updateFields); return $result->isSuccess(); }