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


PHP Student::unsetAttributes方法代码示例

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


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

示例1: actionAdmin

 public function actionAdmin()
 {
     $model = new Student('search');
     $model->unsetAttributes();
     if (isset($_GET['Student'])) {
         $model->setAttributes($_GET['Student']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:ngdvan,项目名称:lntguitar,代码行数:9,代码来源:StudentController.php

示例2: actionVerifyStudents

 public function actionVerifyStudents()
 {
     $model = new Student('search');
     $model->unsetAttributes();
     if (isset($_GET['Student'])) {
         $model->attributes = $_GET['Student'];
     }
     $dataProvider = $model->searchInactive();
     $this->render('verifyStudents', array('model' => $model, 'dataProvider' => $dataProvider));
 }
开发者ID:aakbar24,项目名称:CollegeCorner_Ver_2.0,代码行数:10,代码来源:UserController.php

示例3: actionAdmin

 public function actionAdmin()
 {
     $model = new Student('search');
     $model->unsetAttributes();
     // clear any default value
     $class_id = Yii::app()->user->class_id;
     $model->class_id = $class_id;
     $model->is_check = 1;
     $this->render('admin', array('model' => $model));
 }
开发者ID:houyf,项目名称:class_system,代码行数:10,代码来源:StudentController.php

示例4: prepare_dataproviders

 /**
  *  Prepares dataproviders for models and jstree open nodes.
  * @return  array  Contains the dataproviders for the models,open nodes for the tree and the model to search for.
  * @since 1.0
  */
 private function prepare_dataproviders()
 {
     //create an array open_nodes with the ids of the nodes that we want to be initially open
     //when the tree is loaded.Modify this to suit your needs.Here,we open all nodes on load.
     $categories = Classroom::model()->findAll(array('order' => 'lft'));
     $identifiers = array();
     foreach ($categories as $n => $category) {
         $identifiers[] = "'" . 'node_' . $category->id . "'";
     }
     $open_nodes = implode(',', $identifiers);
     $cat_dataProvider = new CActiveDataProvider('Classroom');
     $prod_criteria = new CDbCriteria();
     $prod_criteria->with = array('assignments' => array('on' => 'assignments.id=:cat_id', 'together' => true, 'joinType' => 'INNER JOIN', 'params' => array(':cat_id' => $_GET['cat_id'])));
     //for search
     $model = new Student('search');
     $model->unsetAttributes();
     if (isset($_GET['Student'])) {
         //if searching
         $model->setAttributes($_GET['Student']);
         $search_criteria = $model->searchCriteria();
         $prod_criteria->mergeWith($search_criteria);
     }
     $prod_dataProvider = new CActiveDataProvider('Student', array('criteria' => $prod_criteria, 'pagination' => array('pageSize' => self::PAGING_SIZE_CAT)));
     return array('cat_provider' => $cat_dataProvider, 'prod_provider' => $prod_dataProvider, 'open_nodes' => $open_nodes, 'model' => $model);
 }
开发者ID:nov072008,项目名称:yiitesting,代码行数:30,代码来源:ClassroomController.php

示例5: actionIndex

 /**
  * Manages all models.
  */
 public function actionIndex()
 {
     if (!isset($_GET['cID'])) {
         $this->redirect(array('classmanager/index'));
     } else {
         $_SESSION['cID'] = $_GET['cID'];
     }
     $model = new Student('search');
     //$model = Student::model()->findAll('ID_Class=:idClass', array('idClass'=>$_SESSION['cID']));
     $model->unsetAttributes();
     // clear any default values
     $model->ID_Class = $_SESSION['cID'];
     if (isset($_GET['Student'])) {
         $model->attributes = $_GET['Student'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:vuvankhai,项目名称:itplus,代码行数:20,代码来源:StudentController.php

示例6: actionAdmin

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

示例7: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin($assignment = null)
 {
     $model = new Student('search');
     $model->unsetAttributes();
     // clear any default values
     if ($assignment) {
         $dataProvider = new CArrayDataProvider($this->loadStudentsFromAssignment($assignment), array('keyField' => 'id', 'pagination' => array('pageSize' => 1000)));
     } else {
         if (isset($_GET['Student'])) {
             $model->attributes = $_GET['Student'];
         }
         $dataProvider = $model->search();
     }
     $this->render('admin', array('model' => $model, 'dataProvider' => $dataProvider));
 }
开发者ID:loristissino,项目名称:swu,代码行数:18,代码来源:StudentController.php


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