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 = []) |
|
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | 4 | public static function tableName() |
|
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | 4 | public function attributeLabels() |
|
70 | |||
71 | /** |
||
72 | * @inheritdoc |
||
73 | */ |
||
74 | 4 | public function behaviors() |
|
85 | |||
86 | public function transactions() |
||
94 | |||
95 | /** |
||
96 | * @inheritdoc |
||
97 | * @return NewsQuery |
||
98 | */ |
||
99 | 4 | public static function find() |
|
103 | |||
104 | /** |
||
105 | * Get all statuses |
||
106 | * |
||
107 | * @return string[] |
||
108 | */ |
||
109 | 4 | public static function getStatuses(): array |
|
116 | |||
117 | /** |
||
118 | * Get statuse name |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | 4 | public function getStatusName(): string |
|
127 | |||
128 | /** |
||
129 | * Is it blocked? |
||
130 | * |
||
131 | * @param bool |
||
132 | */ |
||
133 | 4 | public function isBlocked(): bool |
|
137 | |||
138 | /** |
||
139 | * Is it active? |
||
140 | * |
||
141 | * @param bool |
||
142 | */ |
||
143 | 4 | public function isActive(): bool |
|
147 | |||
148 | 2 | public function getFiles($callable = null) |
|
154 | } |
||
155 |