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