本文整理汇总了PHP中Report::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Report::unsetAttributes方法的具体用法?PHP Report::unsetAttributes怎么用?PHP Report::unsetAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Report
的用法示例。
在下文中一共展示了Report::unsetAttributes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex()
{
$model = new Report('search');
$model->unsetAttributes();
if ($_GET['Report']) {
$model->attributes = $_GET['Report'];
}
list($users, $report) = Report::model()->getUser();
$this->render('index', ['model' => $model, 'users' => $users, 'report' => $report]);
}
示例2: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Report('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Report'])) {
$model->attributes = $_GET['Report'];
}
$this->render('admin', array('model' => $model));
}
示例3: actionItemInactive
public function actionItemInactive($mfilter = '1')
{
$report = new Report();
$report->unsetAttributes();
// clear any default values
if (Yii::app()->request->isAjaxRequest) {
Yii::app()->clientScript->scriptMap['*.js'] = false;
Yii::app()->clientScript->scriptMap['*.css'] = false;
if (isset($_GET['ajax']) && $_GET['ajax'] == 'rpt-item-inactive-grid') {
$this->render('item_expiry', array('report' => $report, 'mfilter' => $mfilter));
} else {
echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('item_inactive_ajax', array('report' => $report, 'mfilter' => $mfilter), true, true)));
Yii::app()->end();
}
} else {
$this->render('item_inactive', array('report' => $report, 'mfilter' => $mfilter));
}
}
示例4: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
if ($this->menu_use[7]) {
$report_type_list = array();
$criteria = new CDbCriteria();
$criteria->condition = 'status=:status';
$criteria->params = array(':status' => 1);
$criteria->order = 'name_th';
$report_type = ReportType::model()->findAll($criteria);
foreach ($report_type as $type) {
$report_type_list[$type->report_type_id] = $type->name_th;
}
$model = new Report('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Report'])) {
$model->attributes = $_GET['Report'];
}
$this->render('admin', array('model' => $model, 'report_type_list' => $report_type_list));
} else {
$this->redirect(array('site/index'));
}
}