![]() |
Xataface Summary Module 0.1
Summary Reports for Xataface Apps
|
Main summary module class. This provides the module initialization and utility methods for working with summary fields. More...
Public Member Functions | |
| __construct () | |
| decorateSummaryField ($key, &$field) | |
| Decorates the field definition of a summary field. This will flesh out missing attributes. It is called automatically when the summary fields are loaded for the table the first time. | |
| getBaseURL () | |
| Returns the base URL to this module's directory. Useful for including Javascripts and CSS. | |
| & | getSummaryFields (Dataface_Table $table) |
| Returns all of the summary field definitions for a particular table. | |
| getSummaryField (Dataface_Table $table, $fieldname) | |
| Returns a summary field definition for a specified field. | |
| getSummarySQL (Dataface_Table $table, $query, $groupBy=null, $summaryFields=null, $graftedSummaryFields=null) | |
Main summary module class. This provides the module initialization and utility methods for working with summary fields.
All access to this object should be handled by the Dataface_ModuleTool:
$summary = Dataface_ModuleTool::getInstance()->loadModule('modules_summary');
Definition at line 34 of file summary.php.
| __construct | ( | ) |
Definition at line 46 of file summary.php.
| decorateSummaryField | ( | $ | key, |
| &$ | field | ||
| ) |
Decorates the field definition of a summary field. This will flesh out missing attributes. It is called automatically when the summary fields are loaded for the table the first time.
| string | $key | The field name. |
| array | &$field | Associative array data structure for the field. This is modified in place by this method. |
Definition at line 61 of file summary.php.
| getBaseURL | ( | ) |
Returns the base URL to this module's directory. Useful for including Javascripts and CSS.
Definition at line 81 of file summary.php.
| getSummaryField | ( | Dataface_Table $ | table, |
| $ | fieldname | ||
| ) |
Returns a summary field definition for a specified field.
| Dataface_Table | $table | The table that we are pulling the field from. |
| string | $fieldname | The name of the field to retrieve. |
Definition at line 139 of file summary.php.
| & getSummaryFields | ( | Dataface_Table $ | table | ) |
Returns all of the summary field definitions for a particular table.
| Dataface_Table | $table | The table from which we are retrieving the summary fields. |
array(
formula => An sql expression for the summary value.
)
Definition at line 104 of file summary.php.
| getSummarySQL | ( | Dataface_Table $ | table, |
| $ | query, | ||
| $ | groupBy = null, |
||
| $ | summaryFields = null, |
||
| $ | graftedSummaryFields = null |
||
| ) |
Gets the SQL query to retrieve the summary for a table.
| Dataface_Table | $table | The table to retrieve the summary for. |
| array | $query | The query parameters for filtering and sorting. |
| array | $groupBy | Optional list of column names to group by. |
| array | $summaryFields | Optional list of summary fields to return. |
| array | $graftedSummaryFields | Optional associative array of add-on summary field definitions to be used for the purpose of this SQL. |
Definition at line 160 of file summary.php.
1.7.4