本文整理汇总了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']);
}
示例2: getCity
/**
* @return \yii\db\ActiveQuery
*/
public function getCity()
{
return $this->hasOne(City::className(), ['id' => 'cityId']);
}
示例3: getCities
public function getCities()
{
return $this->hasMany(City::className(), ['id' => 'city_id'])->viaTable('registration_by_cities', ['registration_id' => 'id', 'registration_type' => 'registrationType']);
}
示例4: getDischargeCity
/**
* @return \yii\db\ActiveQuery
*/
public function getDischargeCity()
{
return $this->hasOne(City::className(), ['city_id' => 'discharge_city_id']);
}
示例5: getEmpPaddCity
/**
* @return \yii\db\ActiveQuery
*/
public function getEmpPaddCity()
{
return $this->hasOne(City::className(), ['city_id' => 'emp_padd_city']);
}
示例6: getRegion
/**
* @return \yii\db\ActiveQuery
*/
public function getRegion()
{
return $this->hasOne(City::className(), ['id' => 'region_id']);
}
示例7: getCityVariants
public function getCityVariants()
{
return $this->hasMany(City::className(), ['cityID' => 'id']);
}
示例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();
示例9: getCity
/**
* Получить город пользователя
* @return City
*/
public function getCity()
{
if ($this->city_id) {
return $this->hasOne(City::className(), ['id' => 'city_id']);
} else {
return new City();
}
}
示例10: getCity
public function getCity()
{
return $this->hasMany(City::className(), ['city_id' => 'id']);
}
示例11: getCityFk
/**
* @return \yii\db\ActiveQuery
*/
public function getCityFk()
{
return $this->hasOne(City::className(), ['city_id' => 'city_fk']);
}