当前位置: 首页>>代码示例>>PHP>>正文


PHP Country::className方法代码示例

本文整理汇总了PHP中app\models\Country::className方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::className方法的具体用法?PHP Country::className怎么用?PHP Country::className使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Country的用法示例。


在下文中一共展示了Country::className方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCountry

 public function getCountry()
 {
     return $this->hasOne(Country::className(), ['ID' => 'CountryID']);
 }
开发者ID:Dionnit,项目名称:Touristic,代码行数:4,代码来源:Tours.php

示例2: getCountry

 public function getCountry()
 {
     return $this->hasMany(Country::className(), ['code' => 'code'])->via('countryFruits');
     //->viaTable('country_fruits', ['id' => 'id']);
 }
开发者ID:s1eepingsun,项目名称:Yii2-advanced,代码行数:5,代码来源:Fruits.php

示例3: getCountries

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountries()
 {
     return $this->hasMany(Country::className(), ['updated_by' => 'user_id']);
 }
开发者ID:aoopvn,项目名称:EduSec4.0.0,代码行数:7,代码来源:User.php

示例4: getCountry

 public function getCountry()
 {
     return $this->hasMany(Country::className(), ['id' => 'country_id'])->viaTable('country_org_rel', ['org_id' => 'id']);
 }
开发者ID:sanmaowang,项目名称:energy-app,代码行数:4,代码来源:Organization.php

示例5: getStateCountry

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStateCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'state_country_id']);
 }
开发者ID:aoopvn,项目名称:EduSec4.0.0,代码行数:7,代码来源:State.php

示例6: getEmpCaddCountry

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmpCaddCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'emp_cadd_country']);
 }
开发者ID:EduSec,项目名称:EduSec,代码行数:7,代码来源:EmpAddress.php

示例7: getCountries

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountries()
 {
     return $this->hasMany(Country::className(), ['id' => 'country_id'])->viaTable('timezone_country', ['timezone_id' => 'id'])->orderBy('{{country}}.[[key]]');
 }
开发者ID:frozenpandaman,项目名称:stat.ink,代码行数:7,代码来源:Timezone.php

示例8: getCountryCode

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountryCode()
 {
     return $this->hasOne(Country::className(), ['Code' => 'CountryCode']);
 }
开发者ID:engmohamedamer,项目名称:gotest,代码行数:7,代码来源:City.php

示例9:

 * 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]);
?>
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:30,代码来源:inherit_form.php

示例10: getStuPaddCountry

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStuPaddCountry()
 {
     return $this->hasOne(Country::className(), ['country_id' => 'stu_padd_country']);
 }
开发者ID:aoopvn,项目名称:EduSec4.0.0,代码行数:7,代码来源:StuAddress.php

示例11: getCountry

 /**
  * Получить страну пользователя
  * @return Country
  */
 public function getCountry()
 {
     if ($this->country_id) {
         return $this->hasOne(Country::className(), ['id' => 'country_id']);
     } else {
         return new Country();
     }
 }
开发者ID:Sywooch,项目名称:TailorPlace,代码行数:12,代码来源:User.php


注:本文中的app\models\Country::className方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。