1 | <?php |
||
21 | class Lang extends ActiveRecord |
||
22 | { |
||
23 | use LocaleHelperTrait; |
||
24 | |||
25 | const STATUS_DISABLE = 1; |
||
26 | |||
27 | const STATUS_ACTIVE = 10; |
||
28 | |||
29 | const PATTERN = '[a-z]{2}'; |
||
30 | |||
31 | /** |
||
32 | * @inheritdoc |
||
33 | */ |
||
34 | public static function tableName() |
||
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | public function rules() |
||
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | public function attributeLabels() |
||
84 | |||
85 | public function isSourceLanguage() |
||
89 | |||
90 | /** |
||
91 | * @return string[] |
||
92 | */ |
||
93 | public function getStatusList() |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getStatusName() |
||
108 | |||
109 | /** |
||
110 | * @param bool $active default false so it is most often used in backend |
||
111 | * @return array |
||
112 | */ |
||
113 | public static function getList($active = false) |
||
126 | |||
127 | /** |
||
128 | * @param bool $active default true so it is most often used in frontend |
||
129 | * @return array |
||
130 | */ |
||
131 | public static function getLocaleList($active = true) |
||
143 | |||
144 | /** |
||
145 | * @inheritdoc |
||
146 | * @return LangQuery the active query used by this AR class. |
||
147 | */ |
||
148 | public static function find() |
||
152 | } |
||
153 |