本文整理汇总了PHP中Feedback::getAllCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::getAllCategory方法的具体用法?PHP Feedback::getAllCategory怎么用?PHP Feedback::getAllCategory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::getAllCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/* @var $this FeedbackController */
/* @var $model Feedback */
$this->breadcrumbs = array('留言' => array('admin'), '管理留言');
$this->menu = array(array('label' => '管理留言', 'url' => array('admin'), 'active' => $this->action->id == 'admin'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#feedback-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<?php
echo CHtml::link('高级搜索', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'feedback-grid', 'summaryText' => false, 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id', 'header' => '#', 'htmlOptions' => array('width' => 50)), array('name' => 'category', 'htmlOptions' => array('width' => 100), 'value' => '$data->categoryLookup()', 'filter' => Feedback::getAllCategory()), array('name' => 'name', 'htmlOptions' => array('width' => 100)), array('name' => 'status', 'htmlOptions' => array('width' => 100), 'value' => '$data->statusLookup()', 'filter' => Feedback::getAllStatus()), array('name' => 'content', 'value' => 'Fircms::truncate_utf8_string($data->content,50)'), array('name' => 'create_time', 'htmlOptions' => array('width' => 180), 'type' => 'datetime'), array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{update},{delete}'))));
?>
示例2: array
/* @var $model Feedback */
/* @var $form CActiveForm */
?>
<div class="wide form">
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('layout' => TbHtml::FORM_LAYOUT_HORIZONTAL, 'action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
<?php
echo $form->textFieldControlGroup($model, 'id');
?>
<?php
echo $form->dropDownListControlGroup($model, 'category', Feedback::getAllCategory());
?>
<?php
echo $form->dropDownListControlGroup($model, 'status', Feedback::getAllStatus());
?>
<?php
echo $form->textFieldControlGroup($model, 'name');
?>
<?php
echo $form->textFieldControlGroup($model, 'position');
?>