Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
measurelistitems.php
1<?php
2
4
6use CCatalogMeasureClassifier;
7
8trait MeasureListItems
9{
10 protected function getMeasureListItems(): array
11 {
12 $result = [];
13
14 $rows = MeasureTable::getList([
15 'select' => [
16 'ID',
17 'CODE',
18 'MEASURE_TITLE',
19 ],
20 'order' => [
21 'IS_DEFAULT' => 'ASC',
22 'CODE' => 'ASC',
23 ],
24 ]);
25
26 foreach ($rows as $row)
27 {
28 $result[$row['ID']] = $row['MEASURE_TITLE'] ?: CCatalogMeasureClassifier::getMeasureTitle($row['CODE']);
29 }
30
31 return $result;
32 }
33}