Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
RedBeanModelDataProvider Class Reference
Inheritance diagram for RedBeanModelDataProvider:
EmptyRedBeanModelDataProvider LeaderboardDataProvider RedBeanModelByRelatedModelDataProvider StarredModelDataProvider

Public Member Functions

 __construct ($modelClassName, $sortAttribute=null, $sortDescending=false, array $searchAttributeData=array(), array $config=array())
 
 getModelClassName ()
 
 setOffset ($offset)
 
 getSort ()
 
 calculateTotalItemCount ()
 

Static Public Member Functions

static resolveSortAttributeColumnName ($modelClassName, &$joinTablesAdapter, $sortAttribute)
 
static getSortAttributeName ($modelClassName)
 
static makeWhere ($modelClassName, array $metadata, &$joinTablesAdapter)
 

Protected Member Functions

 fetchData ()
 
 fetchKeys ()
 
 resolveExtraSql (RedBeanModelJoinTablesQueryAdapter &$joinTablesAdapter, &$where)
 

Protected Attributes

 $modelClassName
 
 $sortAttribute
 
 $sortDescending
 
 $searchAttributeData
 
 $calculatedTotalItemCount
 
 $offset
 

Detailed Description

A data provider that returns models.

Definition at line 40 of file RedBeanModelDataProvider.php.

Constructor & Destructor Documentation

__construct (   $modelClassName,
  $sortAttribute = null,
  $sortDescending = false,
array  $searchAttributeData = array(),
array  $config = array() 
)

- Currently supports only non-related attributes.

Definition at line 52 of file RedBeanModelDataProvider.php.

Member Function Documentation

setOffset (   $offset)

Override the offset value that comes from the pagination object if needed. Used by sticky search for example when retrieving a sticky list in the detail view of a model.

Parameters
integer$offset

Definition at line 83 of file RedBeanModelDataProvider.php.

fetchData ( )
protected

If the count query results in 0, the data query will not be run and an empty array will be returned. This helps to reduce queries to the database. See the yii documentation.

Definition at line 94 of file RedBeanModelDataProvider.php.

static getSortAttributeName (   $modelClassName)
static

Each model has a sort attribute that is used to order the models if none is specified.

Definition at line 177 of file RedBeanModelDataProvider.php.

getSort ( )
Returns
CSort the sorting object. If this is false, it means the sorting is disabled.

Definition at line 196 of file RedBeanModelDataProvider.php.

static makeWhere (   $modelClassName,
array  $metadata,
$joinTablesAdapter 
)
static

Not for use by applications. Public for unit tests only. Override from RedBeanModelDataProvider to support multiple where clauses for the same attribute and operatorTypes

Parameters
metadata- array expected to have clauses and structure elements
$joinTablesAdapter
See Also
DataProviderMetadataAdapter
Returns
string

Definition at line 214 of file RedBeanModelDataProvider.php.

calculateTotalItemCount ( )

See the yii documentation. This function is made public for unit testing. Setting $selectDistinct to true since the count should always be on unique ids

Definition at line 223 of file RedBeanModelDataProvider.php.

fetchKeys ( )
protected

See the yii documentation.

Definition at line 235 of file RedBeanModelDataProvider.php.

resolveExtraSql ( RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter,
$where 
)
protected

Override to add extra where option to the sql

Parameters
RedBeanModelJoinTablesQueryAdapter$joinTablesAdapter
type$where

Definition at line 250 of file RedBeanModelDataProvider.php.


The documentation for this class was generated from the following file:
Generated on Wed Oct 28 2020 07:10:58
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.