Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • ActionFormModelBase
  • CalendarEventFormModel
  • CallFormModel
  • CreatePageFormModel
  • EditMobileFormsFormModel
  • EventCommentPublisherFormModel
  • EventFormModel
  • EventPublisherFormModel
  • FileSystemObjectDataProvider
  • MassActionFormModel
  • MobilePagination
  • NoteFormModel
  • NotificationsController
  • TimeFormModel
  • UploadLogoFormModel
  • X2FormModel
  • X2HttpRequest
  • Overview
  • Package
  • Class
  • Tree

Class FileSystemObjectDataProvider

CArrayDataProvider implements a data provider based on a raw data array.

The CArrayDataProvider::$rawData property contains all data that may be sorted and/or paginated. CArrayDataProvider will supply the data after sorting and/or pagination. You may configure the sort and pagination properties to customize sorting and pagination behaviors.

Elements in the raw data array may be either objects (e.g. model objects) or associative arrays (e.g. query results of DAO). Make sure to set the CArrayDataProvider::$keyField property to the name of the field that uniquely identifies a data record or false if you do not have such a field.

CArrayDataProvider may be used in the following way:

$rawData=Yii::app()->db->createCommand('SELECT * FROM tbl_user')->queryAll();
// or using: $rawData=User::model()->findAll();
$dataProvider=new CArrayDataProvider($rawData, array(
    'id'=>'user',
    'sort'=>array(
        'attributes'=>array(
             'id', 'username', 'email',
        ),
    ),
    'pagination'=>array(
        'pageSize'=>10,
    ),
));
// $dataProvider->getData() will return a list of arrays.

Note: if you want to use the sorting feature, you must configure sort property so that the provider knows which columns can be sorted.

CComponent
Extended by CDataProvider implements IDataProvider
Extended by CArrayDataProvider
Extended by FileSystemObjectDataProvider
Package: system\web
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1.4
Located at x2engine/protected/modules/docs/components/FileSystemObjectDataProvider.php
Methods summary
protected array
# fetchKeys( )

Causes grid view keys to correspond to file system object id. Allows $.fn.yiiGridView.getChecked to return the ids of the file system objects, instead of the data provider offsets.

Causes grid view keys to correspond to file system object id. Allows $.fn.yiiGridView.getChecked to return the ids of the file system objects, instead of the data provider offsets.

Returns

array
list of data item keys.

Overrides

CArrayDataProvider::fetchKeys()
Methods inherited from CArrayDataProvider
__construct(), calculateTotalItemCount(), fetchData(), getSortDirections(), getSortingFieldValue(), sortData()
Methods inherited from CDataProvider
getData(), getId(), getItemCount(), getKeys(), getPagination(), getSort(), getTotalItemCount(), setData(), setId(), setKeys(), setPagination(), setSort(), setTotalItemCount()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties inherited from CArrayDataProvider
$caseSensitiveSort, $keyField, $rawData
Magic properties inherited from CDataProvider
$data, $id, $itemCount, $keys, $pagination, $sort, $totalItemCount
X2CRM Documentation API documentation generated by ApiGen 2.8.0