當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。