/** * @return \yii\db\ActiveQuery */ public function getLibrary() { return $this->hasOne(Library::className(), ['id' => 'library_id']); }
?> <?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 echo $form->field($modelBook, 'year')->widget(yii\widgets\MaskedInput::classname(), ['mask' => '9999']); ?> <div class="form-group"> <label class="control-label" for="book-key-words"><?php echo Yii::t('app', 'Key Words') . ' (' . Yii::t('app', 'Comma separated') . ')'; ?> </label>