- Модуль: crmmobile
- Путь к файлу: ~/bitrix/modules/crmmobile/lib/Controller/Category.php
- Класс: BitrixCrmMobileControllerCategory
- Вызов: Category::getCountersAction
public function getCountersAction(Factory $factory, int $categoryId, array $params = []): ?array
{
if (!$this->canViewItems($factory, $categoryId))
{
return null;
}
$entityTypeName = $factory->getEntityName();
$extra = ['CATEGORY_ID' => $categoryId];
$kanban = Kanban::getInstance($entityTypeName, $extra);
$filterParams = $this->getPreparedFilterParams($params, $kanban, $factory);
$columns = $kanban->getColumns(false, false, $filterParams);
$stages = [];
foreach ($columns as $column)
{
$id = (int)$column['real_id'];
if ($id > 0)
{
$stages[] = new DtoStageCounter([
'id' => $id,
'total' => $column['total'],
'count' => $column['count'],
'currency' => $column['currency'],
'dropzone' => $column['dropzone'],
]);
}
}
return [
'stages' => $stages,
];
}