- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/volume/filetype.php
- Класс: BitrixDiskVolumeFileType
- Вызов: FileType::getMeasurementResult
public function getMeasurementResult(array $collectedData = []): DBResult
{
$parameter = [
'runtime' => [
new EntityExpressionField('DISK_SIZE', 'SUM(DISK_SIZE)'),
new EntityExpressionField('DISK_COUNT', 'SUM(DISK_COUNT)'),
new EntityExpressionField('FILE_SIZE', 'SUM(FILE_SIZE)'),
new EntityExpressionField('FILE_COUNT', 'SUM(FILE_COUNT)'),
new EntityExpressionField('PREVIEW_SIZE', 'SUM(PREVIEW_SIZE)'),
new EntityExpressionField('PREVIEW_COUNT', 'SUM(PREVIEW_COUNT)'),
new EntityExpressionField('VERSION_COUNT', 'SUM(VERSION_COUNT)'),
new EntityExpressionField('PERCENT', 'ROUND(SUM(PERCENT), 1)'),
],
'select' => [
'DISK_SIZE',
'DISK_COUNT',
'FILE_SIZE',
'FILE_COUNT',
'PREVIEW_SIZE',
'PREVIEW_COUNT',
'VERSION_COUNT',
'TYPE_FILE',
'PERCENT',
],
'filter' => $this->getFilter(
[
'=INDICATOR_TYPE' => static::className(),
'=OWNER_ID' => $this->getOwner(),
'!TYPE_FILE' => null,
'=STORAGE_ID' => null,
'=FOLDER_ID' => null,
],
VolumeTable::getEntity()
),
'group' => [
'TYPE_FILE',
],
'order' => $this->getOrder([
'FILE_SIZE' => 'DESC'
]),
'count_total' => true,
];
if ($this->getLimit() > 0)
{
$parameter['limit'] = $this->getLimit();
}
if ($this->getOffset() > 0)
{
$parameter['offset'] = $this->getOffset();
}
return VolumeTable::getList($parameter);
}