public function getCountry() { return $this->hasOne(Country::className(), ['ID' => 'CountryID']); }
public function getCountry() { return $this->hasMany(Country::className(), ['code' => 'code'])->via('countryFruits'); //->viaTable('country_fruits', ['id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getCountries() { return $this->hasMany(Country::className(), ['updated_by' => 'user_id']); }
public function getCountry() { return $this->hasMany(Country::className(), ['id' => 'country_id'])->viaTable('country_org_rel', ['org_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getStateCountry() { return $this->hasOne(Country::className(), ['country_id' => 'state_country_id']); }
public function getCountry() { return $this->hasOne(Country::className(), ['id' => 'country_id']); }
/** * @return \yii\db\ActiveQuery */ public function getEmpCaddCountry() { return $this->hasOne(Country::className(), ['country_id' => 'emp_cadd_country']); }
/** * @return \yii\db\ActiveQuery */ public function getCountries() { return $this->hasMany(Country::className(), ['id' => 'country_id'])->viaTable('timezone_country', ['timezone_id' => 'id'])->orderBy('{{country}}.[[key]]'); }
/** * @return \yii\db\ActiveQuery */ public function getCountryCode() { return $this->hasOne(Country::className(), ['Code' => 'CountryCode']); }
* Use existent form * @var \yii\web\View $this * @var \app\modules\shop\models\DeliveryInformation $deliveryInformation * @var \app\modules\shop\models\OrderDeliveryInformation $orderDeliveryInformation * @var boolean $immutable * @var string $action * @var \yii\bootstrap\ActiveForm $form */ ?> <h3><?php echo Yii::t('app', 'Delivery information'); ?> </h3> <?php echo $form->field($deliveryInformation, 'country_id')->dropDownList(\app\components\Helper::getModelMap(\app\models\Country::className(), 'id', 'name'), ['readonly' => $immutable]); ?> <?php echo $form->field($deliveryInformation, 'city_id')->dropDownList(\app\components\Helper::getModelMap(\app\models\City::className(), 'id', 'name'), ['readonly' => $immutable]); ?> <?php echo $form->field($deliveryInformation, 'zip_code')->textInput(['readonly' => $immutable]); ?> <?php echo $form->field($deliveryInformation, 'address')->textarea(['readonly' => $immutable]); ?> <?php echo $form->field($orderDeliveryInformation, 'shipping_option_id')->dropDownList(\app\components\Helper::getModelMap(\app\modules\shop\models\ShippingOption::className(), 'id', 'name'), ['readonly' => $immutable]); ?>
/** * @return \yii\db\ActiveQuery */ public function getStuPaddCountry() { return $this->hasOne(Country::className(), ['country_id' => 'stu_padd_country']); }
/** * Получить страну пользователя * @return Country */ public function getCountry() { if ($this->country_id) { return $this->hasOne(Country::className(), ['id' => 'country_id']); } else { return new Country(); } }
public function getCountry() { return $this->hasMany(Country::className(), ['code' => 'code'])->via('countryFruits'); }