Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
configuration.php
1<?php
2
4
5use Bitrix\Report\VisualConstructor\BaseConfigField;
9
14class Configuration extends Model
15{
16 protected $gId;
17 protected $weight = 0;
18 protected $value;
19 protected $fieldClassName = '';
20 protected $key;
21
22
29 public static function getMapAttributes()
30 {
31 $attributes = parent::getMapAttributes();
32 $attributes['GID'] = 'gId';
33 $attributes['UKEY'] = 'key';
34 $attributes['SETTINGS'] = 'value';
35 $attributes['CONFIGURATION_FIELD_CLASS'] = 'fieldClassName';
36 $attributes['WEIGHT'] = 'weight';
37 return $attributes;
38 }
39
45 public static function getTableClassName()
46 {
48 }
49
50
54 public function getWeight()
55 {
56 return $this->weight;
57 }
58
65 public function setWeight($weight)
66 {
67 $this->weight = $weight;
68 }
69
73 public function getKey()
74 {
75 return $this->key;
76 }
77
82 public function setKey($key)
83 {
84 $this->key = $key;
85 }
86
90 public function getValue()
91 {
92 return unserialize($this->value, ['allowed_classes' => false]);
93 }
94
101 public function setValue($value)
102 {
103 $this->value = serialize($value);
104 }
105
109 public function getFieldClassName()
110 {
112 }
113
122 {
123 $this->fieldClassName = $fieldClassName;
124 }
125
133 public static function loadByIds(array $ids)
134 {
135 return static::getModelList(array(
136 'select' => array('*'),
137 'filter' => array('ID' => $ids),
138 ));
139 }
140
144 public function getGId()
145 {
146 return $this->gId;
147 }
148
155 public function setGId($gId)
156 {
157 $this->gId = $gId;
158 }
159
160}