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


PHP Status::items方法代码示例

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


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

示例1: array

<?php

$this->breadcrumbs = array('Posts' => array('index'), 'Manage');
$this->menu = array(array('label' => 'List Post', 'url' => array('index')), array('label' => 'Create Post', 'url' => array('create')));
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\$.fn.yiiGridView.update('post-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<div class="row-fluid">
<h1>Manajemen Berita</h1>

<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php 
echo CHtml::link('Advanced Search', '#', array('class' => 'search-button btn'));
?>
<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' => 'post-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'title', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->title), $data->url)'), array('name' => 'status', 'value' => 'Status::item("PostStatus",$data->status)', 'filter' => Status::items('PostStatus')), array('name' => 'create_time', 'type' => 'datetime', 'filter' => false), array('class' => 'TbButtonColumn'))));
?>

</div>
开发者ID:sonaichi,项目名称:Book-Catalogue-Yii,代码行数:28,代码来源:admin.php

示例2: array

/kcfinder/upload.php?type=files',
         filebrowserImageUploadUrl: '<?php 
echo Yii::app()->baseUrl;
?>
/kcfinder/upload.php?type=images',
         filebrowserFlashUploadUrl: '<?php 
echo Yii::app()->baseUrl;
?>
/kcfinder/upload.php?type=flash'
    });
</script>
     <?php 
echo $form->labelEx($model, 'tags');
$this->widget('CAutoComplete', array('model' => $model, 'attribute' => 'tags', 'url' => array('suggestTags'), 'multiple' => true, 'htmlOptions' => array('size' => 50)));
?>
        <p class="help-block"><small>Please separate different tags with commas.</small></p>
        
	<?php 
echo $form->labelEx($model, 'status');
echo $form->dropDownList($model, 'status', Status::items('PostStatus'));
?>

	
	<div class="form-actions">
		<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Simpan' : 'Save'));
?>
	</div>

<?php 
$this->endWidget();
开发者ID:sonaichi,项目名称:Book-Catalogue-Yii,代码行数:31,代码来源:_form.php

示例3: array

<?php

$this->menu = array(array('label' => 'Create Purchase Order', 'url' => array('/suppliers/purchaseOrder')), array('label' => 'Add A New Suppliers', 'url' => array('/suppliers/create')));
?>



<h1>Purchase Orders</h1>

 
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'purchase-order-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('order_number', array('name' => 'supplier_name', 'type' => 'raw', 'value' => 'CHtml::link($data->suppliers->name,Yii::app()->createUrl("purchaseOrder/preview" , array("id"=>$data->id,)))'), array('name' => 'user_name', 'header' => 'Raised By', 'value' => '$data->user->username'), array('name' => 'order_status', 'value' => 'Status::item("Status",$data->order_status)', 'filter' => Status::items('Status')), array('name' => 'date_of_order', 'value' => '$data->date_of_order==null ? "":date("d-M-Y",$data->date_of_order)', 'filter' => false), array('name' => 'date_of_order_recieved', 'value' => '$data->date_of_order_recieved==null ? "":date("d-M-Y",$data->date_of_order_recieved)', 'filter' => false), array('class' => 'CButtonColumn', 'template' => '{update}', 'buttons' => array('update' => array('url' => 'Yii::app()->createUrl("purchaseOrder/preview" , array("id"=>$data->id,))'))))));
开发者ID:EmmanuelFernando,项目名称:rapport-stock-control,代码行数:12,代码来源:admin.php


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