/**
  * @return \yii\db\ActiveQuery
  */
 public function getReference()
 {
     return $this->hasOne(AdRealEstateReference::className(), ['id' => 'reference_id']);
 }
Example #2
0
 /**
  * Returns the array of possible user status values.
  *
  * @return array
  */
 public function getRealEstateAppliancesList()
 {
     $appliances = ArrayHelper::map(AdRealEstateReference::find()->where(['reference_id' => 26])->all(), 'id', 'reference_name');
     $items = [];
     foreach ($appliances as $key => $value) {
         $items[$key] = Yii::t('references', $value);
     }
     return $items;
 }