當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CActiveDataProvider::__construct方法代碼示例

本文整理匯總了PHP中CActiveDataProvider::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveDataProvider::__construct方法的具體用法?PHP CActiveDataProvider::__construct怎麽用?PHP CActiveDataProvider::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CActiveDataProvider的用法示例。


在下文中一共展示了CActiveDataProvider::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor.
  * (e.g. <code>Post::model()</code>, <code>Post::model()->published()</code>).
  * @param array $config configuration (name=>value) to be applied as the initial property values of this class.
  */
 public function __construct($config = array())
 {
     $module = Rights::module();
     $userClass = $module->userClass;
     parent::__construct($userClass, $config);
     $this->_authorizer = $module->getAuthorizer();
 }
開發者ID:eco-systems,項目名稱:eclearance,代碼行數:12,代碼來源:RAssignmentDataProvider.php

示例2: __construct

 public function __construct($modelClass, $config = array())
 {
     if (!isset($config['pagination']['pageSize'])) {
         if (isset(Yii::app()->session[$modelClass . "PerPage"]) && mb_substr(Yii::app()->controller->id, -5) == 'Admin') {
             $page_size = Yii::app()->session[$modelClass . "PerPage"];
         } else {
             $reflection = new ReflectionClass($modelClass);
             $page_size = $reflection->getConstant('PAGE_SIZE');
             if (!$page_size) {
                 $page_size = self::PAGE_SIZE;
             }
         }
         $config['pagination']['pageSize'] = $page_size;
     }
     parent::__construct($modelClass, $config);
 }
開發者ID:nizsheanez,項目名稱:documentation,代碼行數:16,代碼來源:ActiveDataProvider.php

示例3: __construct

 public function __construct($model, $config = array())
 {
     $modelClass = is_string($model) ? $model : get_class($model);
     if (!isset($config['pagination']) || $config['pagination'] !== false) {
         if (isset(Yii::app()->session[$modelClass . "PerPage"]) && Yii::app()->controller instanceof AdminController) {
             $page_size = Yii::app()->session[$modelClass . "PerPage"];
         } else {
             $reflection = new ReflectionClass($modelClass);
             $page_size = $reflection->getConstant('PAGE_SIZE');
             if (!$page_size) {
                 $page_size = self::PAGE_SIZE;
             }
         }
         $config['pagination']['pageSize'] = $page_size;
     }
     parent::__construct($model, $config);
 }
開發者ID:nizsheanez,項目名稱:alp.ru,代碼行數:17,代碼來源:ActiveDataProvider.php

示例4: __construct

 public function __construct($modelClass, $config = array())
 {
     $newConfig = CMap::mergeArray($config, array('pagination' => array('pageSize' => $this->getPageSize())));
     parent::__construct($modelClass, $newConfig);
 }
開發者ID:arossokha,項目名稱:ex-comment,代碼行數:5,代碼來源:ActiveDataProvider.php

示例5: __construct

 /**
  * Constructs class based object.
  * 
  * @param string $modelClass model's class name
  * @param array  $config     provider's config
  */
 public function __construct($modelClass, $config = array())
 {
     parent::__construct($modelClass, $config);
     $this->treeDataOptions = isset($this->treeDataOptions) ? $this->treeDataOptions : array();
     $this->treeDataOptions = CMap::mergeArray(array('keys' => array(), 'columns' => array()), $this->treeDataOptions);
 }
開發者ID:hansenmakangiras,項目名稱:disperindag,代碼行數:12,代碼來源:CActiveTreeDataProvider.php

示例6: __construct

 public function __construct($config)
 {
     parent::__construct('\\app\\models\\AR\\Game', $config);
 }
開發者ID:xexys,項目名稱:xca-backend,代碼行數:4,代碼來源:Game.php

示例7: __construct

 /**
  * Constructor.
  * Can change $config, before calling CActiveDataProvider's __construct.
  * @param mixed $modelClass the model class (e.g. 'Post') or the model finder instance
  * (e.g. <code>Post::model()</code>, <code>Post::model()->published()</code>).
  * @param array $config configuration (name=>value) to be applied as the initial property values of this class.
  */
 public function __construct($modelClass, $config = array())
 {
     //tr('constructing!','constructing!');
     parent::__construct($modelClass, $config);
 }
開發者ID:kuzmina-mariya,項目名稱:gallery,代碼行數:12,代碼來源:KeenActiveDataProvider.php


注:本文中的CActiveDataProvider::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。