本文整理汇总了PHP中app\models\Location::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::getList方法的具体用法?PHP Location::getList怎么用?PHP Location::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Location
的用法示例。
在下文中一共展示了Location::getList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo $form->field($model, 'start_time')->input('datetime');
?>
<?php
echo $form->field($model, 'end_time')->input('datetime');
?>
<?php
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>
<?php
echo $form->field($model, 'summary')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'location_id')->dropDownList(Location::getList());
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例2:
<?php
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>
<div class="col-sm-4 col-md-4 col-lg-4">
<?php
echo $form->field($model, 'subcategory_id')->label('Subcategory')->dropDownList(['' => ''] + Subcategory::getList());
?>
<?php
echo $form->field($model, 'user_id')->label('User')->dropDownList(['' => ''] + User::getList());
?>
<?php
echo $form->field($model, 'location_id')->label('Location')->dropDownList(['' => ''] + Location::getList());
?>
<?php
echo $form->field($model, 'title');
?>
<?php
echo $form->field($model, 'description');
?>
<?php
echo $form->field($model, 'status')->dropDownList(['' => '', $model::STATUS_ACTIVE => 'Active', $model::STATUS_INACTIVE => 'Inactive']);
?>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
示例3:
?>
<label>Email*</label><?php
echo $form->field($userModel, 'email')->label(false)->textInput(['class' => 'loginInput']);
?>
<label>Phone*</label><?php
echo $form->field($userModel, 'phone')->label(false)->textInput(['class' => 'loginInput']);
?>
<?php
}
?>
<label>State*</label><div id="sortContainer">
<div tabindex="0" class="onclick-menu">
<ul class="onclick-menu-content">
<?php
$locations = Location::getList();
?>
<?php
foreach ($locations as $id => $title) {
?>
<li data-field="ad-location_id" data-id="<?php
echo $id;
?>
"><?php
echo $title;
?>
</li></a>
<?php
}
?>
</ul>