예제 #1
0
파일: Kurs.php 프로젝트: Kolya-an/wemamas
 public function getCategoryKurs()
 {
     return $this->hasOne(CategoryKurs::className(), ['category_kurs_id' => 'category_kurs_id']);
 }
예제 #2
0
파일: _form.php 프로젝트: Kolya-an/wemamas
<div class="kurs-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'kurs_name')->textInput(['maxlength' => true]);
?>
    
    <?php 
echo $form->field($model, 'kurs_url');
?>
    
    <?php 
echo $form->field($model, 'categoryKurs')->dropDownList(ArrayHelper::map(CategoryKurs::find()->all(), 'category_kurs_id', 'category_kurs_name'));
?>
    
    <?php 
echo $form->field($model, 'kursStatus')->dropDownList(ArrayHelper::map(KursStatus::find()->all(), 'kurs_status_id', 'kurs_status_name'));
?>
    
    <?php 
echo $form->field($model, 'kurs_brief')->textarea();
?>
    
    <?php 
echo $form->field($model, 'kurs_subscribe')->textarea();
?>
    
 <?php