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


PHP State::items方法代码示例

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


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

示例1: operator

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('city-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Manage Cities</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'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php 
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
    $pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
    $pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'city-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), 'city_name', array('name' => 'state_id', 'value' => 'State::item($data->state_id)', 'filter' => State::items()), array('name' => 'country_id', 'value' => 'Country::item($data->country_id)', 'filter' => Country::items()), array('class' => 'MyCButtonColumn')), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:30,代码来源:admin.php

示例2: array

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'dataProvider'=>$model,
	'summaryText'=>false,
	'enableSorting'=>false,
	'enablePagination' => false,
	'columns'=>array(
		array(
		'header'=>'SI No',
		'class'=>'IndexColumn',
		),
		'city_name',
	    	array(
		    'name'=>'state_id',
		    'value'=>'State::model()->findByPk($data->state_id)->state_name',
	    	    'filter'=>  State::items(),
		),
		array(
			'name'=>'country_id',
            		'value'=>'Country::model()->findByPk($data->country_id)->name',
            		'filter'=>  Country::items(),
        	),
		
	),
)); ?>
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:24,代码来源:CityExportPdf.php

示例3:

echo $form->labelEx($model, 'student_address_p_pin');
?>
		<?php 
echo $form->textField($model, 'student_address_p_pin');
?>
		<?php 
echo $form->error($model, 'student_address_p_pin');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'student_address_p_state');
?>
		<?php 
echo $form->dropDownList($model, 'student_address_p_state', State::items());
?>
		<?php 
echo $form->error($model, 'student_address_p_state');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'student_address_p_country');
?>
		<?php 
echo $form->dropDownList($model, 'student_address_p_country', Country::items());
?>
		<?php 
echo $form->error($model, 'student_address_p_country');
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:31,代码来源:_form.php

示例4:

?>
		<?php 
echo $form->textField($model, 'employee_address_p_pincode');
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'employee_address_p_pincode');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'employee_address_p_state');
?>
		<?php 
echo $form->dropDownList($model, 'employee_address_p_state', State::items());
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'employee_address_p_state');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'employee_address_p_country');
?>
		<?php 
echo $form->dropDownList($model, 'employee_address_p_country', Country::items());
?>
<span class="status">&nbsp;</span>
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:31,代码来源:_form.php

示例5: array

<div class="operation">
<?php 
echo CHtml::link('PDF', array('exportToPDFExcel/CityExportToPdf'), array('class' => 'btnyellow', 'target' => '_blank'));
echo CHtml::link('Excel', array('exportToPDFExcel/CityExportToExcel'), array('class' => 'btnblue'));
?>
</div>

<div class="portlet box blue">
 <div class="portlet-title"> City
 </div>

<?php 
echo CHtml::link('Add New +', array('city/create'), array('class' => 'btn green'));
?>


<?php 
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
    $pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
    $pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'city-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'selectionChanged' => "function(id){\n\t\twindow.location='" . Yii::app()->urlManager->createUrl('city/view', array('id' => '')) . "' + \$.fn.yiiGridView.getSelection(id);\n\t}", 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), 'city_name', array('name' => 'state_id', 'value' => 'State::item($data->state_id)', 'filter' => State::items())), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
?>
</div>
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:30,代码来源:admin.php


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