All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
ReportResultsRowData Class Reference
Inheritance diagram for ReportResultsRowData:

Public Member Functions

 getDisplayAttributes ()
 
 __construct (array $displayAttributes, $id)
 
 __isset ($name)
 
 __get ($name)
 
 addModelAndAlias (RedBeanModel $model, $alias)
 
 addSelectedColumnNameAndValue ($columnName, $value)
 
 addSelectedColumnNameAndLabel ($columnName, $label)
 
 getLabel ($columnName)
 
 addSelectedColumnNameAndRowSpan ($columnName, $value)
 
 getSelectedColumnRowSpan ($columnName)
 
 getModel ($attribute)
 
 getAttributeLabel ($attribute)
 
 getId ()
 
 getDataParamsForDrillDownAjaxCall ()
 
 resolveRawValueByDisplayAttributeKey ($displayAttributeKey)
 

Static Public Member Functions

static resolveAttributeNameByKey ($key)
 
static resolveKeyByAttributeName ($attribute)
 
static resolveDataParamKeyForDrillDown ($attributeIndexOrDerivedType)
 

Data Fields

const ATTRIBUTE_NAME_PREFIX = 'attribute'
 
const DRILL_DOWN_GROUP_BY_VALUE_PREFIX = 'groupByRowValue'
 

Protected Member Functions

 shouldResolveValueFromModel ($attributeAlias)
 
 resolveModel ($displayAttributeKey)
 
 resolveValueFromModel ($displayAttributeKey)
 
 resolveModelAttributeValueForPenultimateRelation (RedBeanModel $model, $attribute, DisplayAttributeForReportForm $displayAttribute)
 
 resolveRawValueByModel (DisplayAttributeForReportForm $displayAttribute, RedBeanModel $model)
 
 getModelByAlias ($alias)
 

Protected Attributes

 $id
 
 $displayAttributes
 
 $modelsByAliases = array()
 
 $selectedColumnNamesAndValues = array()
 
 $selectedColumnNamesAndRowSpans = array()
 
 $selectedColumnNamesAndLabels = array()
 

Detailed Description

For each row of data generated using the data provider, a ReportResultsRowData object is created. The methods in this class allow ListViewColumnAdapters to easily retrieve the values of display attributes to display. There are 2 types of data, raw data such as SUM(amount) and model data such as $account->name. The columnAliasNames on the display attributes are accessed internally so if you call $reportResultsRowsData->col1, the object will resolve the value either from the raw data or from an attribute on a model.

Definition at line 44 of file ReportResultsRowData.php.

Constructor & Destructor Documentation

__construct ( array  $displayAttributes,
  $id 
)
Parameters
array$displayAttributes
int$id

Definition at line 111 of file ReportResultsRowData.php.

Member Function Documentation

static resolveAttributeNameByKey (   $key)
static
Parameters
$key
Returns
string

Definition at line 85 of file ReportResultsRowData.php.

__isset (   $name)
Parameters
string$name
Returns
bool

Definition at line 122 of file ReportResultsRowData.php.

__get (   $name)
Parameters
string$name
Returns
mixed

Definition at line 135 of file ReportResultsRowData.php.

addModelAndAlias ( RedBeanModel  $model,
  $alias 
)
Parameters
RedBeanModel$model
string$alias
Exceptions
NotSupportedExceptionif the alias does not have a corresponding model

Definition at line 155 of file ReportResultsRowData.php.

addSelectedColumnNameAndValue (   $columnName,
  $value 
)
Parameters
string$columnName
mixed$value

Definition at line 169 of file ReportResultsRowData.php.

addSelectedColumnNameAndLabel (   $columnName,
  $label 
)
Parameters
string$columnName
string$label

Definition at line 178 of file ReportResultsRowData.php.

getLabel (   $columnName)
Parameters
string$columnName
Returns
string

Definition at line 188 of file ReportResultsRowData.php.

addSelectedColumnNameAndRowSpan (   $columnName,
  $value 
)
Parameters
string$columnName
mixed$value

Definition at line 198 of file ReportResultsRowData.php.

getSelectedColumnRowSpan (   $columnName)
Parameters
string$columnName
Returns
string

Definition at line 208 of file ReportResultsRowData.php.

getModel (   $attribute)
Parameters
string$attribute
Returns
null
Exceptions
NotSupportedExceptionif the displayAttributeKey can not be extracted from the string $attribute passed as a parameter

Definition at line 220 of file ReportResultsRowData.php.

getAttributeLabel (   $attribute)

Utilized by export adapters to get the header label for each column.

Parameters
$attribute
Returns
string
Exceptions
NotSupportedException

Definition at line 237 of file ReportResultsRowData.php.

getId ( )
Returns
int

Definition at line 271 of file ReportResultsRowData.php.

getDataParamsForDrillDownAjaxCall ( )
Returns
array

Definition at line 279 of file ReportResultsRowData.php.

static resolveDataParamKeyForDrillDown (   $attributeIndexOrDerivedType)
static
Parameters
string$attributeIndexOrDerivedType
Returns
string

Definition at line 317 of file ReportResultsRowData.php.

resolveRawValueByDisplayAttributeKey (   $displayAttributeKey)
Parameters
string$displayAttributeKey
Returns
A

Definition at line 326 of file ReportResultsRowData.php.

shouldResolveValueFromModel (   $attributeAlias)
protected
Parameters
string$attributeAlias
Returns
bool

Definition at line 346 of file ReportResultsRowData.php.

resolveModel (   $displayAttributeKey)
protected
Parameters
$displayAttributeKey
Returns
null
Exceptions
NotSupportedExceptionif the key specified does not exist

Definition at line 361 of file ReportResultsRowData.php.

resolveValueFromModel (   $displayAttributeKey)
protected
Parameters
string$displayAttributeKey
Returns
mixed $value
Exceptions
NotSupportedExceptionif the key specified does not exist

Definition at line 381 of file ReportResultsRowData.php.

resolveModelAttributeValueForPenultimateRelation ( RedBeanModel  $model,
  $attribute,
DisplayAttributeForReportForm  $displayAttribute 
)
protected

The check for OwnedModel below, is because it is possible that something like Address 'state' would be coming into this method for retrieval. but depending how things are called, it might need to use the penultimate relation instead of looking for the attribute on the $model.

Parameters
RedBeanModel$model
string$attribute
DisplayAttributeForReportForm$displayAttribute
Returns
mixedg $value
Exceptions
NotSupportedException

Definition at line 412 of file ReportResultsRowData.php.

resolveRawValueByModel ( DisplayAttributeForReportForm  $displayAttribute,
RedBeanModel  $model 
)
protected
Parameters
DisplayAttributeForReportForm$displayAttribute
RedBeanModel$model
Returns
mixed $value

Definition at line 444 of file ReportResultsRowData.php.

getModelByAlias (   $alias)
protected
Parameters
string$alias
Returns
RedBeanModel
Exceptions
NotSupportedExceptionif the $alias does not exist

Definition at line 476 of file ReportResultsRowData.php.


The documentation for this class was generated from the following file:
Generated on Sat Mar 28 2020 07:11:18