/** * Returns the array of possible user status values. * * @return array */ public function getClassList() { $appliances = ArrayHelper::map(AdStyle::find()->all(), 'id', 'name'); $items = []; foreach ($appliances as $key => $value) { $items[$key] = Yii::t('references', $value); } return $items; }
/** * @return \yii\db\ActiveQuery */ public function getAdStyle() { return $this->hasOne(AdStyle::className(), ['id' => 'ad_style_id']); }