Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
manager.php
1<?php
2
4
7
12{
16 private function __construct() {}
17
25 public static function getList(array $parameters = [])
26 {
27 return Sale\TradingPlatformTable::getList($parameters);
28 }
29
30 public static function getObjectById(int $id)
31 {
32 if (!$id)
33 {
34 return null;
35 }
36
37 $platform = Sale\TradingPlatformTable::getRowById($id);
38 if ($platform === null)
39 {
40 return null;
41 }
42 if (class_exists($platform['CLASS']))
43 {
44 return $platform['CLASS']::getInstanceByCode($platform['CODE']);
45 }
46
47 return null;
48 }
49
50 public static function getActivePlatformList() : array
51 {
52 $result = [];
53
54 $dbRes = self::getList([
55 'select' => ['ID', 'NAME'],
56 'filter' => ['=ACTIVE' => 'Y']
57 ]);
58 while ($platform = $dbRes->fetch())
59 {
60 $result[$platform['ID']] = $platform['NAME'];
61 }
62
63 return $result;
64 }
65}
static getList(array $parameters=[])
Definition manager.php:135
static getList(array $parameters=[])
Definition manager.php:25