Пример #1
0
 public function init()
 {
     parent::init();
     if ($this->modelClass === null) {
         $this->modelClass = Country::className();
     }
 }
Пример #2
0
 public function getCountry()
 {
     return $this->hasOne(Country::className(), ['id' => 'country_id']);
 }