本文整理汇总了PHP中app\models\Categories::makeDropDown方法的典型用法代码示例。如果您正苦于以下问题:PHP Categories::makeDropDown方法的具体用法?PHP Categories::makeDropDown怎么用?PHP Categories::makeDropDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Categories
的用法示例。
在下文中一共展示了Categories::makeDropDown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo $form->field($model, 'title')->input('text', ['style' => 'width: 400px;']);
?>
<div class="form-group required" style="padding-left: 0px; padding-right: 0px;">
<label>คำอธิบายหมวดหมู่</label>
<?php
echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['rows' => 5], 'preset' => 'standard']);
?>
<div class="help-block"></div>
</div>
<?php
echo $form->field($model, 'id', ['options' => ['class' => 'sr-only']])->hiddenInput();
?>
<?php
echo $form->field($model, 'langs', ['options' => ['class' => 'sr-only']])->hiddenInput();
?>
</div>
<div class="col-lg-4">
<?php
echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 150px;', 'disabled' => true]);
echo $form->field($model, 'parent_id')->dropDownList(Categories::makeDropDown($model->langs), ['style' => 'margin-right: 10px;width: 300px;']);
?>
</div>
</div>
</div>
<?php
ActiveForm::end();
?>
</div>
示例2:
<br/>
<div class="row">
<div class="col-lg-4">
<a href="<?php
echo Url::to(['update']);
?>
" class="btn btn-danger"><i class="glyphicon glyphicon-plus"></i> เขียนบทความ</a>
</div>
<div class="col-lg-8">
<?php
$form = ActiveForm::begin(['id' => 'article-form', 'options' => ['class' => 'form-inline pull-right'], 'fieldConfig' => ['template' => "{label}{input}", 'labelOptions' => ['class' => 'sr-only']]]);
?>
<div class="row">
<div class="col-lg-12">
<?php
echo $form->field($model, 'cid')->dropDownList(Categories::makeDropDown($model->langs), ['style' => 'margin-right: 10px; width: 250px;', 'onchange' => 'form.submit();']);
//$langOption = new \appCMS\language\LanguageCms();
echo $form->field($model, 'langs')->dropDownList(\app\models\tblLangs::makeDropDown(), ['style' => 'width: 120px;', 'onchange' => 'form.submit();']);
?>
</div>
</div>
<div class="row" style="margin-top: 10px;">
<div class="col-lg-12">
<?php
echo $form->field($model, 'search')->input('text', ['style' => 'width: 300px']);
?>
<?php
echo Html::submitButton('<i class="glyphicon glyphicon-search"></i> ค้นหา', ['class' => 'btn btn-danger']);
?>
</div>
</div>