DataSourceBase
        
        Base class for the Table widget data sources.
    
    
abstract class Backend\Widgets\Table\DataSourceBaseProperties
protected $keyColumn : string
Specifies a name of record's key column
protected $offset : int
Internal record offset
Methods
            
            
            
                public
            
                        
            construct (string $keyColumn = "id")
                    
        
        Class constructor.
| Property | Type | Description | 
|---|---|---|
| $keyColumn | string | string Specifies a name of the key column. | 
public getCount () : int
Returns a total number of records in the data source.
public getRecords (int $offset, int $count) : array
Return records from the data source.
| Property | Type | Description | 
|---|---|---|
| $offset | int | int Specifies the offset of the first record to return, zero-based. | 
| $count | int | int Specifies the number of records to return. | 
Returns the records. If there are no more records, returns an empty array.
public initRecords (array $records)
Initializes records in the data source.
The method doesn't replace existing records and could be called multiple times in order to fill the data source.
| Property | Type | Description | 
|---|---|---|
| $records | array | array Records to initialize in the data source. | 
public purge ()
Removes all records from the data source.
            
            
            
                public
            
                        
            readRecords (integer $count = 10)
                            : array
                    
        
        Returns a set of records from the data source.
| Property | Type | Description | 
|---|---|---|
| $count | integer | integer Specifies the number of records to return. | 
Returns the records. If there are no more records, returns an empty array.
public reset ()
Rewinds the the data source to the first record.
Use this method with the readRecords() method.
public searchRecords ($query, $offset, $count)
Identical to getRecords except provided with a search query.
| Property | Type | Description | 
|---|---|---|
| $query | mixed | mixed | 
| $offset | mixed | mixed | 
| $count | mixed | mixed | 
Extended by
| Class | Description | 
|---|---|
| ClientMemoryDataSource | The client-memory data source for the Table widget. | 
| ServerEventDataSource | The server-event data source for the Table widget. |