Exemple #1
0
 public function getCountry()
 {
     return $this->hasOne(Country::className(), ['ID' => 'CountryID']);
 }
Exemple #2
0
 public function getCountry()
 {
     return $this->hasMany(Country::className(), ['code' => 'code'])->via('countryFruits');
     //->viaTable('country_fruits', ['id' => 'id']);
 }
Exemple #3
0
 /**
  * @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']);
 }
Exemple #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStateCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'state_country_id']);
 }
Exemple #6
0
 public function getCountry()
 {
     return $this->hasOne(Country::className(), ['id' => 'country_id']);
 }
Exemple #7
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmpCaddCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'emp_cadd_country']);
 }
Exemple #8
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountries()
 {
     return $this->hasMany(Country::className(), ['id' => 'country_id'])->viaTable('timezone_country', ['timezone_id' => 'id'])->orderBy('{{country}}.[[key]]');
 }
Exemple #9
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountryCode()
 {
     return $this->hasOne(Country::className(), ['Code' => 'CountryCode']);
 }
Exemple #10
0
 * 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]);
?>
Exemple #11
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStuPaddCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'stu_padd_country']);
 }
Exemple #12
0
 /**
  * Получить страну пользователя
  * @return Country
  */
 public function getCountry()
 {
     if ($this->country_id) {
         return $this->hasOne(Country::className(), ['id' => 'country_id']);
     } else {
         return new Country();
     }
 }
Exemple #13
0
 public function getCountry()
 {
     return $this->hasMany(Country::className(), ['code' => 'code'])->via('countryFruits');
 }