当前位置: 首页>>代码示例>>PHP>>正文


PHP Category::getList方法代码示例

本文整理汇总了PHP中common\models\Category::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Category::getList方法的具体用法?PHP Category::getList怎么用?PHP Category::getList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common\models\Category的用法示例。


在下文中一共展示了Category::getList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

        <?php 
echo $form->field($model, 'complect', ['options' => ['class' => '']])->textarea(['rows' => 1]);
?>
        <?php 
echo $form->field($model, 'description', ['options' => ['class' => '']])->textarea(['rows' => 1]);
?>
        <?php 
echo $form->field($model, 'characteristics', ['options' => ['class' => '']])->textarea(['rows' => 1]);
?>
        <?php 
echo $form->field($model, 'doc_links', ['options' => ['class' => '']])->textarea(['rows' => 1]);
?>
    </div>
    <div class="form-group col-md-4">
        <?php 
echo $form->field($model, 'category_id', ['options' => ['class' => '']])->dropDownList(Category::getList());
?>
        <?php 
echo $form->field($model, 'serial', ['options' => ['class' => '']])->textInput(['maxlength' => true]);
?>
        <?php 
/* = $form->field($model, 'status', ['options'=>['class'=>'']])->textInput() */
?>
        <?php 
echo $form->field($model, 'condition', ['options' => ['class' => '']])->dropDownList(Condition::getList());
?>
        <?php 
echo $form->field($model, 'provided_by', ['options' => ['class' => '']])->dropDownList($providers);
?>
        <?php 
/* = $form->field($model, 'fixed_by', ['options'=>['class'=>'']])->textInput(['maxlength' => true]) */
开发者ID:Sywooch,项目名称:armin,代码行数:31,代码来源:_form.php

示例2:

?>

<div class="part-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

	<div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Сохранить' : 'Изменить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'onclick' => "\$('#file-input').fileinput('upload');"]);
?>
    </div>

    <?php 
echo $form->field($model, 'category_id')->dropDownList(Category::getList());
?>
	
	<?php 
echo $form->field($model, 'file_schema')->widget(FileAPI::className(), ['settings' => ['url' => ['/part/fileapi-upload']]]);
?>
	
	<?php 
echo $form->field($model, 'file_foto')->widget(FileAPI::className(), ['settings' => ['url' => ['/part/fileapi-upload']]]);
?>

	<?php 
/*<?= $form->field($model, 'logo')->fileInput() ?>*/
?>

	<?php 
开发者ID:phpsong,项目名称:ExtJS5-Yii2,代码行数:31,代码来源:_form.php

示例3: actionEditcategory

 public function actionEditcategory($id)
 {
     $category = Category::findOne(['id' => $id]);
     if (!$category) {
         return $this->run('error');
     }
     if (\Yii::$app->request->post("Category")) {
         $category->attributes = \Yii::$app->request->post("Category");
         $category->save();
     }
     return $this->render('category_edit', ['category' => $category, 'parents' => Category::getList()]);
 }
开发者ID:BoBRoID,项目名称:plochadka,代码行数:12,代码来源:SiteController.php

示例4:

<h1>Посты</h1>
<?php 
$form = new \yii\bootstrap\ActiveForm();
$form->begin();
echo $form->field($post, 'category')->dropDownList(\common\models\Category::getList()), $form->field($post, 'premium'), $form->field($post, 'title'), $form->field($post, 'content')->textarea(), $form->field($post, 'price'), $form->field($post, 'phone'), $form->field($post, 'email');
?>

<button class="btn btn-default" type="submit">Сохранить</button>
<?php 
$form->end();
开发者ID:BoBRoID,项目名称:plochadka,代码行数:10,代码来源:post_edit.php

示例5: actionCreatepost

 public function actionCreatepost()
 {
     if (\Yii::$app->user->isGuest) {
         return $this->run('site/login');
     }
     $post = new Post();
     $data = \Yii::$app->request->post("Post");
     if (!empty($data)) {
         $post->load(\Yii::$app->request->post());
     }
     if (!empty($data) && $post->validate() && $post->save()) {
         return $this->render('create_post_success', ['post' => $post]);
     } else {
         return $this->render('create_post', ['post' => $post, 'categoryList' => Category::getList()]);
     }
 }
开发者ID:BoBRoID,项目名称:plochadka,代码行数:16,代码来源:SiteController.php


注:本文中的common\models\Category::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。