All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Static Protected Member Functions | Protected Attributes
ModelRelationsAndAttributesToSummableReportAdapter Class Reference
Inheritance diagram for ModelRelationsAndAttributesToSummableReportAdapter:
ModelRelationsAndAttributesToReportAdapter ModelRelationsAndAttributesToMatrixReportAdapter ModelRelationsAndAttributesToSummationReportAdapter

Public Member Functions

 getAttributesForFilters ()
 
 getAttributeLabel ($attribute)
 
 getAttributesForDisplayAttributes ($existingGroupBys=array(), RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 resolveDisplayAttributeTypeAndAddSelectClause (RedBeanModelSelectQueryAdapter $selectQueryAdapter, $attribute, $tableName, $columnName, $columnAliasName, $queryStringExtraPart=null)
 
 resolveOrderByStringForCalculationOrModifier ($attribute, $tableName, $columnName, $queryStringExtraPart=null)
 
 relationIsReportedAsAttribute ($relation)
 
 isAttributeACalculationOrModifier ($attribute)
 
 isAttributeACalculatedGroupByModifier ($attribute)
 
 getCalculationOrModifierType ($attribute)
 
 getAttributesForGroupBys ()
 
 isAttributeIndexOrDerivedTypeADisplayCalculation ($attributeIndexOrDerivedType)
 
 isDisplayAttributeMadeViaSelect ($attribute)
 
 getDisplayElementType ($attribute)
 
- Public Member Functions inherited from ModelRelationsAndAttributesToReportAdapter
 getModel ()
 
 getModelClassName ()
 
 getModuleClassName ()
 
 getRules ()
 
 __construct (RedBeanModel $model, ReportRules $rules, $reportType, $moduleClassName=null)
 
 getAttributeLabel ($attribute)
 
 getRelationLabel ($relation)
 
 isReportedOnAsARelation ($relationOrAttribute)
 
 getRelationModuleClassName ($relation)
 
 getRelationModelClassName ($relation)
 
 getAttributesForFilters ()
 
 getAttributesForDisplayAttributes ()
 
 getAttributesForOrderBys ()
 
 getAttributesForGroupBys ()
 
 getAvailableOperatorsType ($attribute)
 
 getFilterValueElementType ($attribute)
 
 getDisplayElementType ($attribute)
 
 getRealModelAttributeType ($attribute)
 
 getAllRelationsData ()
 
 getSelectableRelationsDataResolvedForUserAccess (User $user, Array $relations)
 
 getSelectableRelationsData (RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 getAttributesIncludingDerivedAttributesData ()
 
 isRelationASingularRelation ($relation)
 
 isOwnedRelation ($relation)
 
 getInferredRelationsData (RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 getFilterRulesByAttribute ($attribute, $ruleAttributeName)
 
 relationIsReportedAsAttribute ($relation)
 
 isDerivedRelationsViaCastedUpModelRelation ($relation)
 
 isInferredRelation ($relation)
 
 isDynamicallyDerivedAttribute ($attribute)
 
 getRawValueRelatedAttribute ($attribute)
 
 isAttributeReadOptimization ($attribute)
 
 isDerivedAttribute ($attribute)
 
 isDisplayAttributeMadeViaSelect ($attribute)
 

Static Public Member Functions

static forgetAll ()
 
static resolveRealAttributeName ($attribute)
 
- Static Public Member Functions inherited from ModelRelationsAndAttributesToReportAdapter
static forgetAll ()
 
static make ($moduleClassName, $modelClassName, $reportType)
 
static resolveRealAttributeName ($attribute)
 

Data Fields

const DISPLAY_CALCULATION_COUNT = 'Count'
 
const DISPLAY_CALCULATION_SUMMMATION = 'Summation'
 
const DISPLAY_CALCULATION_AVERAGE = 'Average'
 
const DISPLAY_CALCULATION_MINIMUM = 'Minimum'
 
const DISPLAY_CALCULATION_MAXIMUM = 'Maximum'
 
const GROUP_BY_CALCULATION_DAY = 'Day'
 
const GROUP_BY_CALCULATION_WEEK = 'Week'
 
const GROUP_BY_CALCULATION_MONTH = 'Month'
 
const GROUP_BY_CALCULATION_QUARTER = 'Quarter'
 
const GROUP_BY_CALCULATION_YEAR = 'Year'
 
- Data Fields inherited from ModelRelationsAndAttributesToReportAdapter
const DYNAMIC_ATTRIBUTE_USER = 'User'
 
const DYNAMIC_RELATION_INFERRED = 'Inferred'
 

Protected Member Functions

 getDisplayCalculationAttributes ()
 
 getDisplayCalculationAttribute (&$attributes, $attribute)
 
 resolveGroupByAttributesForDisplayAttributes (RedBeanModel $precedingModel=null, $precedingRelation=null, &$attributes, $existingGroupBys)
 
 resolveDisplayCalculationAttributeData (&$attributes, $attribute, $type)
 
 resolveDisplayCalculationLabel ($attribute, $type)
 
 getGroupByModifierAttributes ()
 
 getGroupByCalculatedModifierAttributes ()
 
 resolveGroupByCalculationAttributeData (&$attributes, $attribute, $type)
 
 getGroupByCalculationTypeByAttribute ($attribute)
 
 resolveGroupByCalculationLabel ($attribute, $type)
 
 getDisplayAttributeForMakingViaSelectType ($attribute)
 
- Protected Member Functions inherited from ModelRelationsAndAttributesToReportAdapter
 getAttributesNotIncludingDerivedAttributesData ()
 
 derivedRelationLinksToPrecedingRelation ($relationModelClassName, $opposingRelation, RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 inferredRelationLinksToPrecedingRelation ($inferredModelClassName, $relation, RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 relationLinksToPrecedingRelation ($relation, RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 getDerivedRelationsViaCastedUpModelData (RedBeanModel $precedingModel=null, $precedingRelation=null)
 
 getDerivedAttributesData ()
 
 getDynamicallyDerivedAttributesData ()
 
 getInferredRelationModelClassNamesForRelation ($relation)
 
 resolveRelationToSelectableRelationData (&$attributes, $attribute)
 
 getDerivedAttributesDataByReportRules ()
 

Static Protected Member Functions

static getTranslatedDisplayCalculationShortLabel ($type)
 
static getDisplayCalculationTypes ()
 
static translatedDisplayCalculationShortLabels ()
 
static getTranslatedGroupByCalculationShortLabel ($type)
 
static translatedGroupByCalculationShortLabels ()
 
static getAttributeTypesToExcludeAsGroupByModifiers ()
 

Protected Attributes

 $shouldIncludeIdAsGroupByAttribute = true
 
- Protected Attributes inherited from ModelRelationsAndAttributesToReportAdapter
 $model
 
 $rules
 
 $reportType
 
 $moduleClassName
 

Detailed Description

Base kelper class for managing adapting model relations and attributes into a summable report

Definition at line 40 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

Member Function Documentation

static getTranslatedDisplayCalculationShortLabel (   $type)
staticprotected
Parameters
$type
Returns
string

Definition at line 90 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getDisplayCalculationTypes ( )
staticprotected
Returns
array

Definition at line 105 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static translatedDisplayCalculationShortLabels ( )
staticprotected
Returns
array

Definition at line 119 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getTranslatedGroupByCalculationShortLabel (   $type)
staticprotected
Parameters
$type
Returns
string

Definition at line 134 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static translatedGroupByCalculationShortLabels ( )
staticprotected
Returns
array

Definition at line 144 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForFilters ( )
Returns
array

Definition at line 158 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributeLabel (   $attribute)
Parameters
string$attribute

Definition at line 169 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForDisplayAttributes (   $existingGroupBys = array(),
RedBeanModel  $precedingModel = null,
  $precedingRelation = null 
)
Parameters
array$existingGroupBys
null | RedBeanModel$precedingModel
null | string$precedingRelation
Returns
array
Exceptions
NotSupportedExceptionif there the preceding model and relation are not either both defined or both null

Definition at line 193 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayAttributeTypeAndAddSelectClause ( RedBeanModelSelectQueryAdapter  $selectQueryAdapter,
  $attribute,
  $tableName,
  $columnName,
  $columnAliasName,
  $queryStringExtraPart = null 
)
Parameters
RedBeanModelSelectQueryAdapter$selectQueryAdapter
string$attribute
string$tableName
string$columnName
string$columnAliasName
null | string$queryStringExtraPart

Definition at line 222 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveOrderByStringForCalculationOrModifier (   $attribute,
  $tableName,
  $columnName,
  $queryStringExtraPart = null 
)
Parameters
string$attribute
string$tableName
string$columnName
null | string$queryStringExtraPart
Returns
string
Exceptions
NotSupportedExceptionif the type is invalid or null

Definition at line 289 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

relationIsReportedAsAttribute (   $relation)
Parameters
string$relation
Returns
bool

Definition at line 350 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeACalculationOrModifier (   $attribute)
Parameters
string$attribute
Returns
bool

Definition at line 364 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeACalculatedGroupByModifier (   $attribute)
Parameters
string$attribute
Returns
bool

Definition at line 380 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static resolveRealAttributeName (   $attribute)
static
Parameters
string$attribute
Returns
string

Definition at line 395 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getCalculationOrModifierType (   $attribute)
Parameters
string$attribute
Returns
string

Definition at line 409 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForGroupBys ( )
Returns
array

Definition at line 429 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeIndexOrDerivedTypeADisplayCalculation (   $attributeIndexOrDerivedType)
Parameters
string$attributeIndexOrDerivedType
Returns
bool

Definition at line 446 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isDisplayAttributeMadeViaSelect (   $attribute)
Parameters
string$attribute
Returns
bool

Definition at line 465 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayElementType (   $attribute)
Parameters
string$attribute
Returns
string
Exceptions
NotSupportedExceptionif the attribute is an invalid display calculation

Definition at line 482 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getAttributeTypesToExcludeAsGroupByModifiers ( )
staticprotected
Returns
array

Definition at line 530 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayCalculationAttributes ( )
protected
Returns
array

Definition at line 538 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayCalculationAttribute ( $attributes,
  $attribute 
)
protected
Parameters
array$attributes
string$attribute

Definition at line 557 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByAttributesForDisplayAttributes ( RedBeanModel  $precedingModel = null,
  $precedingRelation = null,
$attributes,
  $existingGroupBys 
)
protected
Parameters
null | RedBeanModel$precedingModel
null | string$precedingRelation
array$attributes
array$existingGroupBys

Definition at line 588 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayCalculationAttributeData ( $attributes,
  $attribute,
  $type 
)
protected
Parameters
array$attributes
string$attribute
string$type

Definition at line 645 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayCalculationLabel (   $attribute,
  $type 
)
protected
Parameters
string$attribute
string$type
Returns
string

Definition at line 659 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getGroupByModifierAttributes ( )
protected
Returns
array

Definition at line 669 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getGroupByCalculatedModifierAttributes ( )
protected
Returns
array

Definition at line 686 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByCalculationAttributeData ( $attributes,
  $attribute,
  $type 
)
protected
Parameters
array$attributes
string$attribute
string$type

Definition at line 714 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getGroupByCalculationTypeByAttribute (   $attribute)
protected
Parameters
$attribute
Returns
mixed

Definition at line 727 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByCalculationLabel (   $attribute,
  $type 
)
protected
Parameters
string$attribute
string$type
Returns
string

Definition at line 739 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayAttributeForMakingViaSelectType (   $attribute)
protected
Parameters
string$attribute
Returns
string

Definition at line 750 of file ModelRelationsAndAttributesToSummableReportAdapter.php.


The documentation for this class was generated from the following file:
Generated on Wed Apr 1 2020 07:11:12