GroupedAttributeCountUtil Class Reference

Static Public Member Functions

static getCountData ($modelClassName, $attributeName, $filterByAttributeName=null, $filterByAttributeValue=null)

Static Protected Member Functions

static getGroupBySqlPart ($tableName, $columnName)
static runQueryBySqlAndGetCountData ($sql)

Detailed Description

Helper class used to query models and group by specific attributes.

Definition at line 40 of file GroupedAttributeCountUtil.php.

Member Function Documentation

static getCountData ( modelClassName,
filterByAttributeName = null,
filterByAttributeValue = null 
) [static]

Query a model's table by attributeName to get the count of attribute values. An example usage is if you want to know how many records have a certain contact state for all states.

$filterByAttributeName - string identifying attribute that should be filtered on.
$filterByAttributeValue - string of value to filter the attribute by.
array of atributeValue / count pairings.

Definition at line 49 of file GroupedAttributeCountUtil.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Dec 9 07:10:54 2019