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


PHP Clients::getClientsStatesArray方法代码示例

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


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

示例1: actionActivateClientState

 public function actionActivateClientState()
 {
     $field = isset($_GET['field']) ? $_GET['field'] : 'state';
     $this->scenario = 'update_client_state';
     $action = Yii::app()->request->getParam('value', null);
     $id = Yii::app()->request->getParam('id', null);
     $availableStates = Clients::getClientsStatesArray();
     if (!array_key_exists($action, $availableStates)) {
         $action = 0;
     }
     if (!(!$id && $action === null)) {
         $model = $this->loadModel($id);
         if ($this->scenario) {
             $model->scenario = $this->scenario;
         }
         if ($model) {
             $model->{$field} = $action;
             $model->save(false);
         }
     }
     echo CHtml::link($availableStates[$action]);
 }
开发者ID:barricade86,项目名称:raui,代码行数:22,代码来源:MainController.php

示例2: array

	<p class="note"><?php 
echo Yii::t('common', 'Fields with <span class="required">*</span> are required.');
?>
</p>

	<?php 
echo $form->errorSummary($model);
?>

	<div class="rowold">
		<?php 
echo $form->labelEx($model, 'state');
?>
		<?php 
echo $form->dropDownList($model, 'state', Clients::getClientsStatesArray(), array('class' => 'width175'));
?>
		<?php 
echo $form->error($model, 'state');
?>
	</div>

	<div class="rowold">
		<?php 
echo $form->labelEx($model, 'contract_number');
?>
		<?php 
echo $form->textField($model, 'contract_number', array('class' => 'width100', 'maxlength' => 255));
?>
		<?php 
echo $form->error($model, 'contract_number');
开发者ID:barricade86,项目名称:raui,代码行数:30,代码来源:_form.php

示例3: array

<?php

$this->breadcrumbs = array(tt('Manage clients', 'clients'));
$this->menu = array(array('label' => tt('Add client', 'clients'), 'url' => array('create')));
$this->adminTitle = tt('Manage clients', 'clients');
$columns = array(array('class' => 'CCheckBoxColumn', 'id' => 'itemsSelected', 'selectableRows' => '2', 'htmlOptions' => array('class' => 'center')), array('name' => 'id', 'htmlOptions' => array('class' => 'id_column'), 'sortable' => false), array('name' => 'state', 'type' => 'raw', 'value' => 'Yii::app()->controller->returnControllerClientStateHtml($data, "clients-grid")', 'htmlOptions' => array('class' => 'apartments_status_column'), 'sortable' => false, 'filter' => Clients::getClientsStatesArray()), array('name' => 'contract_number', 'htmlOptions' => array('class' => 'id_column'), 'sortable' => false), array('name' => 'first_name', 'sortable' => false), array('name' => 'second_name', 'sortable' => false), array('name' => 'middle_name', 'sortable' => false), array('name' => 'birthdate', 'sortable' => false), array('name' => 'phone', 'sortable' => false));
$columns[] = array('class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{view}{update}{delete}', 'deleteConfirmation' => tc('Are you sure you want to delete this item?'));
$this->widget('CustomGridView', array('id' => 'clients-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'afterAjaxUpdate' => 'function(){$("a[rel=\'tooltip\']").tooltip(); $("div.tooltip-arrow").remove(); $("div.tooltip-inner").remove();}', 'columns' => $columns));
$this->renderPartial('//site/admin-select-items', array('url' => '/clients/backend/main/itemsSelected', 'id' => 'clients-grid', 'model' => $model, 'options' => array('delete' => Yii::t('common', 'Delete'))));
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.jeditable.js', CClientScript::POS_END);
Yii::app()->clientScript->registerScript('editable_select_state', "\n\t\tfunction ajaxSetModerationClientState(elem, id, id_elem, items){\n\t\t\t\$('#editable_select_state-'+id_elem).editable('" . Yii::app()->controller->createUrl("activateclientstate") . "', {\n\t\t\t\tdata   : items,\n\t\t\t\ttype   : 'select',\n\t\t\t\tcancel : '" . tc('Cancel') . "',\n\t\t\t\tsubmit : '" . tc('Ok') . "',\n\t\t\t\tstyle  : 'inherit',\n\t\t\t\tsubmitdata : function() {\n\t\t\t\t\treturn {id : id_elem};\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t", CClientScript::POS_HEAD);
开发者ID:barricade86,项目名称:raui,代码行数:11,代码来源:admin.php


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