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,
attributeName,
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.

Parameters:
$filterByAttributeName - string identifying attribute that should be filtered on.
$filterByAttributeValue - string of value to filter the attribute by.
Returns:
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 Fri Dec 15 07:10:25 2017