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


PHP Registration::unsetAttributes方法代码示例

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


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

示例1: actionRegistration

 public function actionRegistration()
 {
     $model = new Registration();
     $model->unsetAttributes();
     $model->attributes = $this->aRequest('Registration');
     $this->renderPartial('registration', array('model' => $model));
 }
开发者ID:sunshy360,项目名称:cubingchina,代码行数:7,代码来源:UserController.php

示例2: actionCompetitions

 public function actionCompetitions()
 {
     $model = new Registration();
     $model->unsetAttributes();
     $model->user_id = $this->user->id;
     $this->render('competitions', array('model' => $model));
 }
开发者ID:sunshy360,项目名称:cubingchina,代码行数:7,代码来源:UserController.php

示例3: actionCompetitors

 public function actionCompetitors()
 {
     $competition = $this->getCompetition();
     $model = new Registration('search');
     $model->unsetAttributes();
     $model->competition_id = $competition->id;
     $model->status = Registration::STATUS_ACCEPTED;
     $this->render('competitors', array('model' => $model, 'competition' => $competition));
 }
开发者ID:sunshy360,项目名称:cubingchina,代码行数:9,代码来源:CompetitionController.php

示例4: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Registration('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Registration'])) {
         $model->attributes = $_GET['Registration'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:RSol,项目名称:yupe,代码行数:13,代码来源:RegistrationController.php

示例5: actionPreviewNotice

 public function actionPreviewNotice()
 {
     $id = $this->iGet('id');
     $competition = Competition::model()->findByPk($id);
     if ($competition === null) {
         throw new CHttpException(404, '未知比赛ID');
     }
     if ($this->user->isOrganizer() && !isset($competition->organizers[$this->user->id])) {
         throw new CHttpException(403, '权限不足');
     }
     $competition->formatEvents();
     $registration = new Registration();
     $registration->unsetAttributes();
     $registration->competition_id = $id;
     $model = new SendNoticeForm();
     if (isset($_POST['SendNoticeForm'])) {
         $model->attributes = $_POST['SendNoticeForm'];
     }
     echo json_encode($model->getPreview($competition));
 }
开发者ID:sunshy360,项目名称:cubingchina,代码行数:20,代码来源:RegistrationController.php


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