1 | <?php |
||
22 | class News extends \yii\db\ActiveRecord |
||
23 | { |
||
24 | const STATUS_BLOCKED = 0; |
||
25 | const STATUS_ACTIVE = 1; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | public $gallery; |
||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | public $galleryTitles; |
||
35 | |||
36 | 4 | public function __construct($config = []) |
|
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | 4 | public static function tableName() |
|
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | public function rules() |
||
78 | |||
79 | /** |
||
80 | * @inheritdoc |
||
81 | */ |
||
82 | 4 | public function attributeLabels() |
|
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | public function attributeHints() |
||
106 | |||
107 | /** |
||
108 | * @inheritdoc |
||
109 | */ |
||
110 | 4 | public function behaviors() |
|
121 | |||
122 | public function transactions() |
||
130 | |||
131 | /** |
||
132 | * @inheritdoc |
||
133 | * @return NewsQuery |
||
134 | */ |
||
135 | 4 | public static function find() |
|
139 | |||
140 | /** |
||
141 | * Get all statuses |
||
142 | * |
||
143 | * @return string[] |
||
144 | */ |
||
145 | 4 | public static function getStatuses(): array |
|
152 | |||
153 | /** |
||
154 | * Get statuse name |
||
155 | * |
||
156 | * @return string |
||
157 | */ |
||
158 | 4 | public function getStatusName(): string |
|
163 | |||
164 | /** |
||
165 | * Is it blocked? |
||
166 | * |
||
167 | * @param bool |
||
168 | */ |
||
169 | public function isBlocked(): bool |
||
173 | |||
174 | /** |
||
175 | * Is it active? |
||
176 | * |
||
177 | * @param bool |
||
178 | */ |
||
179 | public function isActive(): bool |
||
183 | |||
184 | public function getFiles($callable = null) |
||
190 | } |
||
191 |