array_keys(static::statusKeyRange())], ]; } /** * @return array */ public function scenarios() { return [ 'published' => ['published'], 'deleted' => ['deleted'], 'position' => ['position'], 'backend' => [ 'position', 'published', 'deleted' ] ]; } /** * @return array */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'position' => Yii::t('app', 'Position'), 'created_at' => Yii::t('app', 'Create time'), 'updated_at' => Yii::t('app', 'Update time'), 'published' => Yii::t('app', 'Published'), 'deleted' => Yii::t('app', 'Deleted'), ]; } /** * @return \yii\db\ActiveQuery */ public function getLang() { return $this->hasOne(RegionLang::class, ['rid' => 'id']); } /** * @return Module|null the module instance, `null` if the module does not exist. */ public static function getModule() { return Yii::$app->getModule(self::moduleName); } }