Example #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStatus()
 {
     return $this->hasOne(Status::className(), ['id' => 'status_id']);
 }
Example #2
0
?>

        <?php 
echo $form->field($modelBook, 'language_id')->dropDownList(BookForm::createArrayMap(Language::className(), 'id', 'name'));
?>

        <?php 
echo $form->field($modelBook, 'publisher_id')->dropDownList(BookForm::createArrayMap(Publisher::className(), 'id', 'name'));
?>

        <?php 
echo $form->field($modelBook, 'type_id')->dropDownList(BookForm::createArrayMapTranslate(Type::className(), 'id', 'type'));
?>

        <?php 
echo $form->field($modelBook, 'status_id')->dropDownList(BookForm::createArrayMapTranslate(Status::className(), 'id', 'status'));
?>

        <?php 
echo $form->field($modelBook, 'category_id')->dropDownList(BookForm::createArrayMapTranslate(Category::className(), 'id', 'category_name'));
?>

        <?php 
echo $form->field($modelBook, 'library_id')->dropDownList(BookForm::createArrayMap(Library::className(), 'id', 'name'));
?>

        <?php 
echo $form->field($modelBook, 'edition')->textInput();
?>

        <?php