Example #1
0
 public function getOkrug()
 {
     if ($this->id_okrug) {
         return FOkrug::findOne($this->id_okrug);
     } else {
         return false;
     }
 }
 public function actionModalGeo()
 {
     $okrugs = FOkrug::find()->all();
     if ($okrug = $this->geo->getOkrug()) {
         $regions = $okrug->region;
     } else {
         $regions = false;
     }
     if ($region = $this->geo->getRegion()) {
         $cityes = $region->city;
     } else {
         $cityes = false;
     }
     return $this->renderPartial('modalGeo', ['okrugs' => $okrugs, 'regions' => $regions, 'cityes' => $cityes]);
 }
Example #3
0
 public function actionIndexRegion($id)
 {
     $FRegion = FRegion::find()->where(["id_okrug" => $id])->orderBy('sort, name')->all();
     $FOkrug = FOkrug::findOne($id);
     return $this->render('indexRegion', ['regions' => $FRegion, 'okrug' => $FOkrug]);
 }
Example #4
0
 public function getOkrug()
 {
     return $this->hasOne(FOkrug::className(), ['id' => 'id_okrug']);
 }