/**
  * @return \yii\db\ActiveQuery
  */
 public function getCity()
 {
     return $this->hasOne(RgnCity::className(), ['id' => 'city_id']);
 }
 /**
  * Provide data for Depdrop options
  * @param type $selected
  *
  * @return mixed
  */
 public function actionDepdropOptions($selected = 0)
 {
     echo \common\helpers\DepdropHelper::getOptionData(['modelClass' => RgnCity::className(), 'parents' => ['province_id' => function ($value) {
         return $value > 0 ? $value : "";
     }], 'filter' => ['status' => RgnCity::STATUS_ACTIVE], 'selected' => $selected]);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRgnCities()
 {
     return $this->hasMany(RgnCity::className(), ['province_id' => 'id'])->andFilterWhere(['like', 'recordStatus', RgnCity::RECORDSTATUS_USED]);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRgnCities()
 {
     return $this->hasMany(RgnCity::className(), ['province_id' => 'id'])->andFilterWhere(['like', 'status', RgnCity::STATUS_ACTIVE]);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCity()
 {
     return $this->hasOne(\frontend\models\RgnCity::className(), ['id' => 'city_id']);
 }