當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。