本文整理匯總了PHP中app\models\Author::getListAuthor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Author::getListAuthor方法的具體用法?PHP Author::getListAuthor怎麽用?PHP Author::getListAuthor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Author
的用法示例。
在下文中一共展示了Author::getListAuthor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
use yii\widgets\ActiveForm;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $model app\models\BooksSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class = "books-search">
<?php
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>
<div class = "row">
<div
class = "col-md-4"> <?php
echo $form->field($model, 'author_id')->dropDownList(\app\models\Author::getListAuthor(), $params = ['prompt' => 'Укажите автора книги....']);
?>
</div>
<div class = "col-md-4"><?php
echo $form->field($model, 'name');
?>
</div>
</div>
<div class = "row">
<div class = "col-sm-4">
<?php
echo $form->field($model, 'date_from', ['template' => '{label}{input}'])->label('Дата выхода книги: ')->widget(DatePicker::classname(), ['language' => 'ru', 'dateFormat' => 'php:d.m.Y']);
?>
</div>
<div class = "col-sm-3">
<?php