本文整理汇总了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]);
}
示例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');
示例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);