Esempio n. 1
0
 public function init()
 {
     parent::init();
     if ($this->modelClass === null) {
         $this->modelClass = Region::className();
     }
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegions()
 {
     return $this->hasMany(Region::className(), ['country_id' => 'id'])->orderBy(['name' => SORT_ASC]);
 }
Esempio n. 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegion()
 {
     return $this->hasOne(Region::className(), ['id' => 'region_id']);
 }