本文整理汇总了PHP中Customer::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::unsetAttributes方法的具体用法?PHP Customer::unsetAttributes怎么用?PHP Customer::unsetAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::unsetAttributes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
*/
public function actionIndex()
{
if (!Yii::app()->user->id) {
$this->redirect(array('site/login'));
}
$user = User::model()->findByPk(Yii::app()->user->uid);
$status = CHtml::listData(Status::getStatus(), 'status', 'image');
if ($user->role_id == 2) {
Yii::app()->user->setState('role', 2);
}
if (Yii::app()->user->isUser()) {
$model = new Customer('search');
$model->franchise();
$model->desc();
$model->unsetAttributes();
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
$this->render('//customer/admin1', array('model' => $model, 'statuses' => json_encode($status)));
} else {
$criteria = new CDbCriteria();
$criteria->order = 'id desc';
if (Yii::app()->user->isFranchiseAdmin()) {
$criteria->compare('franchise', Yii::app()->user->franchise);
}
$dataProvider = new CActiveDataProvider('Customer', array('criteria' => $criteria, 'pagination' => array('pageSize' => 10)));
$this->render('welcome', array('dataProvider' => $dataProvider));
}
}
示例2: actionAdmin
public function actionAdmin()
{
$model = new Customer('search');
$model->unsetAttributes();
if (isset($_GET['Customer'])) {
$model->setAttributes($_GET['Customer']);
}
$this->render('admin', array('model' => $model));
}
示例3: actionIndex
/**
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
*/
public function actionIndex()
{
$this->pageTitle = "List of Customer";
$model = new Customer('search');
$model->unsetAttributes();
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
$this->render($this->view . 'index', array('model' => $model));
}
示例4: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
IsAuth::Admin();
$model = new Customer('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
$this->render('admin', array('model' => $model));
}
示例5: array
?>
</div>
</td>
<td>
<div class="row">
<?php
echo $form->labelEx($model, 'addressbookid');
?>
<?php
echo $form->hiddenField($model, 'addressbookid');
?>
<input type="text" name="product_name" id="fullname" readonly >
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'addressbook_dialog', 'options' => array('title' => Yii::t('app', 'Customer'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$customer = new Customer('search');
$customer->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
$customer->attributes = $_GET['Customer'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'addressbook-grid', 'dataProvider' => $customer->Searchwstatus(), 'filter' => $customer, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+",
array("name" => "send_absschedule",
"id" => "send_absschedule",
"onClick" => "$(\\"#addressbook_dialog\\").dialog(\\"close\\"); $(\\"#fullname\\").val(\\"$data->fullname\\"); $(\\"#Soheader_addressbookid\\").val(\\"$data->addressbookid\\");
"))'), array('name' => 'addressbookid', 'visible' => false, 'value' => '$data->addressbookid'), 'fullname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("addressbook-grid");$("#addressbook_dialog").dialog("open"); return false;'));
?>
<?php
echo $form->error($model, 'addressbookid');
?>
示例6: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Customer('searchwstatus');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'customeraddress' => $this->customeraddress, 'customercontact' => $this->customercontact, 'acchutang' => $this->acchutang));
}
示例7: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Customer('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
}
$this->render('admin', array('model' => $model));
}
示例8: actionCustomers
public function actionCustomers()
{
$model = new Customer('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
$model->attributes = $_GET['Customer'];
}
$this->render('cus_index', array('customer' => $model, 'hasType' => false));
}