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


PHP City::className方法代码示例

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


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

示例1: getCities

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

示例2: getCity

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCity()
 {
     return $this->hasOne(City::className(), ['id' => 'cityId']);
 }
开发者ID:araks74,项目名称:dnb,代码行数:7,代码来源:School.php

示例3: getCities

 public function getCities()
 {
     return $this->hasMany(City::className(), ['id' => 'city_id'])->viaTable('registration_by_cities', ['registration_id' => 'id', 'registration_type' => 'registrationType']);
 }
开发者ID:unix-admin,项目名称:profitday,代码行数:4,代码来源:Company.php

示例4: getDischargeCity

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDischargeCity()
 {
     return $this->hasOne(City::className(), ['city_id' => 'discharge_city_id']);
 }
开发者ID:Shumer596,项目名称:site.loc,代码行数:7,代码来源:Transport.php

示例5: getEmpPaddCity

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

示例6: getRegion

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRegion()
 {
     return $this->hasOne(City::className(), ['id' => 'region_id']);
 }
开发者ID:richardgarcia7,项目名称:apc-softdev-gd121mi122-06,代码行数:7,代码来源:Province.php

示例7: getCityVariants

 public function getCityVariants()
 {
     return $this->hasMany(City::className(), ['cityID' => 'id']);
 }
开发者ID:arsik,项目名称:xfit,代码行数:4,代码来源:City.php

示例8:

 * @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]);
?>

    <?php 
/** @var \app\properties\AbstractModel $abstractModel */
$abstractModel = $orderDeliveryInformation->getAbstractModel();
开发者ID:tqsq2005,项目名称:dotplant2,代码行数:31,代码来源:inherit_form.php

示例9: getCity

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

示例10: getCity

 public function getCity()
 {
     return $this->hasMany(City::className(), ['city_id' => 'id']);
 }
开发者ID:roman1970,项目名称:lis,代码行数:4,代码来源:Weather.php

示例11: getCityFk

 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCityFk()
 {
     return $this->hasOne(City::className(), ['city_id' => 'city_fk']);
 }
开发者ID:NightWatch-BG,项目名称:sglobka,代码行数:7,代码来源:Address.php


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