Ejemplo n.º 1
0
 /**
  * Связь со страной
  * @return \yii\db\ActiveQuery
  */
 public function getCountry()
 {
     return $this->hasOne(Country::className(), ["id" => "country_id"]);
 }
Ejemplo n.º 2
0
 * @var $model \app\modules\reviews\models\Profile
 */
use app\modules\reviews\models\Profile;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
$this->title = 'Заголовок главной страницы';
?>

<div class="well">
    <?php 
$form = ActiveForm::begin(['method' => 'GET']);
?>
    <div class="row">
        <div class="col-md-4">
            <?php 
echo $form->field($model, 'countryId')->dropDownList(\app\modules\geo\models\Country::dropDown(), ['prompt' => ' --- ']);
?>
            <?php 
echo $form->field($model, 'regionId')->dropDownList($regionList, ['prompt' => ' --- ']);
?>
            <?php 
echo $form->field($model, 'cityId')->dropDownList($cityList, ['prompt' => ' --- ']);
?>
        </div>
        <div class="col-md-4">
            <?php 
echo $form->field($model, 'imya');
?>
            <?php 
echo $form->field($model, 'familiya');
?>