...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice_invoice.php
- Класс: \CCrmInvoiceRestService
- Вызов: CCrmInvoiceRestService::fields
static function fields() { $fieldsInfo = self::getFieldsInfo(); $fields = array(); foreach ($fieldsInfo as $fName => $fInfo) { if (mb_substr($fName, 0, 19) === 'INVOICE_PROPERTIES.') { if (mb_substr($fName, 18) === '.{}') { $definition = array('key' => self::makeFieldInfo($fInfo)); $fields['INVOICE_PROPERTIES']['definition'] = $definition; } elseif (mb_substr($fName, 18) === '.{}.') $fields['INVOICE_PROPERTIES']['definition']['value'] = self::makeFieldInfo($fInfo); } elseif (mb_substr($fName, 0, 13) === 'PRODUCT_ROWS.') { if (mb_substr($fName, 12) === '.[]') { $definition = array('row' => array()); $fields['PRODUCT_ROWS']['definition'] = $definition; } elseif (mb_substr($fName, 12, 4) === '.[].') { $subName = mb_substr($fName, 16); $fieldInfo = self::makeFieldInfo($fInfo); $name = \CCrmProductRow::GetFieldCaption($subName); $fieldInfo['title'] = !empty($name) ? $name : $subName; $fields['PRODUCT_ROWS']['definition']['row'][$subName] = $fieldInfo; } } else { $fields[$fName] = self::makeFieldInfo($fInfo); $name = \Bitrix\Crm\InvoiceTable::getFieldCaption($fName); $fields[$fName]['title'] = !empty($name) ? $name : $fName; } } // user fields $ufInfos = array(); self::prepareUserFieldsInfo($ufInfos, CCrmInvoice::$sUFEntityID); $fields = array_merge($fields, CCrmRestHelper::prepareFieldInfos($ufInfos)); return $fields; }