...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/widget/data/company/activitystreamstatistics.php
- Класс: Bitrix\Crm\Widget\Data\Company\ActivityStreamStatistics
- Вызов: ActivityStreamStatistics::initializeDemoData
public function initializeDemoData(array $data, array $params) { $group = isset($params['group'])? mb_strtoupper($params['group']) : ''; if($group === self::GROUP_BY_STREAM) { $streams = StatisticsStream::getDescriptions(); $identityField = isset($data['identityField']) && $data['identityField'] !== '' ? $data['identityField'] : 'STREAM_ID'; $titleField = isset($data['titleField']) && $data['titleField'] !== '' ? $data['titleField'] : 'STREAM'; foreach($data['items'] as $k => $item) { $streamId = isset($item[$identityField]) ? $item[$identityField] : ''; if($streamId !== '' && isset($streams[$streamId])) { $data['items'][$k][$titleField] = $streams[$streamId]; } } } return $data; }