Пример #1
0
 /**
  * @inheritdoc
  */
 static function findOne($condition)
 {
     $model = parent::findOne($condition);
     $city = $model->city;
     if ($city) {
         $model->province_id = $city->province_id;
         $model->_province = $city->province;
         if ($model->_province) {
             $model->country_id = $model->_province->country_id;
         }
     }
     return $model;
 }