当前位置: 首页>>代码示例>>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;未经允许,请勿转载。