1 | <?php |
||
24 | class Language extends ActiveRecord implements LanguageListInterface, LanguageFieldInterface, ModelInterface |
||
25 | { |
||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | public static function tableName() |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | public function rules() |
||
98 | |||
99 | /** |
||
100 | * @inheritdoc |
||
101 | */ |
||
102 | public function attributeLabels() |
||
114 | |||
115 | /** |
||
116 | * Reset the default language. |
||
117 | * |
||
118 | * @param boolean $insert |
||
119 | * |
||
120 | * @return mixed |
||
121 | */ |
||
122 | public function beforeSave($insert) |
||
138 | |||
139 | /** |
||
140 | * Returns the default language. |
||
141 | * |
||
142 | * @return array|null|\yii\db\ActiveRecord |
||
143 | */ |
||
144 | public static function getDefaultLanguage() |
||
152 | |||
153 | /** |
||
154 | * List of available languages in short name format. |
||
155 | * |
||
156 | * @return array |
||
157 | */ |
||
158 | public static function getShortLanguageList(): array |
||
165 | |||
166 | /** |
||
167 | * Returns a list of available languages in the system. |
||
168 | * |
||
169 | * @return Language[] |
||
170 | */ |
||
171 | public function getLanguageList(): array |
||
175 | |||
176 | /** |
||
177 | * Returns the full name of the language. |
||
178 | * |
||
179 | * @return string |
||
180 | */ |
||
181 | public function getName(): string |
||
185 | |||
186 | /** |
||
187 | * Returns the short name of the language. |
||
188 | * |
||
189 | * @return string |
||
190 | */ |
||
191 | public function getShortName(): string |
||
195 | |||
196 | /** |
||
197 | * Returns default mode. |
||
198 | * |
||
199 | * @return int |
||
200 | */ |
||
201 | public function getDefault(): int |
||
205 | |||
206 | /** |
||
207 | * Returns current model id. |
||
208 | * |
||
209 | * @return int |
||
210 | */ |
||
211 | public function getId(): int |
||
215 | } |
||
216 |