![]() |
Xataface Summary Module 0.1
Summary Reports for Xataface Apps
|
This HTML action displays the summary list for a particular table. It respects all normal Xataface URL query parameters in addition to 2 custom parameters: More...
Public Member Functions | |
handle ($params) | |
Entry point for the action. | |
supports ($fieldname, $funcname) | |
Utility function to check if a particular aggregate function is supported on a particular column/field. | |
getSummaryLabel ($col) | |
Utility method to get the label for a particular summary column on the current table. | |
getFieldLabel ($col) | |
Utility function to retrieve the label of a regular table column. | |
isSelectedGroupField ($fieldname) | |
Checks whether a particular field is one of the currently selected group-by fields. | |
isSelectedSummaryField ($fieldname, $func=null) | |
Checks whether a paricular field (and optionally function) are currently selected to be included as a column in the summary stats list. | |
get ($array, $key) | |
Convenience method to fetch a value from an associative array. | |
getSelectedSummaryColumns () | |
Returns an array of the currently selected summary columns. | |
getCellValue ($fieldname, $value) | |
explainQueryParam ($label, $value) | |
getCurrentFilters () |
This HTML action displays the summary list for a particular table. It respects all normal Xataface URL query parameters in addition to 2 custom parameters:
string | -group-by A comma-delimited list of fields on which to group the summaries by. |
string | -summary-cols A comma-delimited list of summary columns to display. |
This action uses the xataface/modules/summary/main.html template which extends Dataface_Main_Template.html
It is located in the templates directory of this module and can be overridden in the application templates directory just like any other template.
This action uses the Dataface_JavascriptTool to manage its javascript dependencies. Its main javascript file (which registers its own dependencies) is located at js/xataface/modules/summary/summary-page.js.
This action uses the Dataface_CSSTool class to manage its CSS dependencies. Its main CSS file is located at css/xataface/modules/summary/main_summary_page.css
This action requires the "summary" permission in order to access it. The module assigns this permission only to the ADMIN, and MANAGER roles by default. You must manually add this permission to any role that you wish to have access.
Definition at line 61 of file summary_page.php.
explainQueryParam | ( | $ | label, |
$ | value | ||
) |
Definition at line 465 of file summary_page.php.
get | ( | $ | array, |
$ | key | ||
) |
Convenience method to fetch a value from an associative array.
This is used from within the xataface/modules/summary/main.html template to show which of the grouped-by fields are selected in the select list.
array | $array | The associative array from which to retrieve the value. |
string | $key | The key of the array to retrieve. |
Definition at line 444 of file summary_page.php.
getCellValue | ( | $ | fieldname, |
$ | value | ||
) |
Definition at line 456 of file summary_page.php.
getCurrentFilters | ( | ) |
Definition at line 498 of file summary_page.php.
getFieldLabel | ( | $ | col | ) |
Utility function to retrieve the label of a regular table column.
This is used from within the xataface/modules/summary/main.html template to display the column headings.
string | $col | The name of the field/column whose label we wish to retrieve. |
Definition at line 391 of file summary_page.php.
getSelectedSummaryColumns | ( | ) |
Returns an array of the currently selected summary columns.
Definition at line 450 of file summary_page.php.
getSummaryLabel | ( | $ | col | ) |
Utility method to get the label for a particular summary column on the current table.
This is used from within the xataface/modules/summary/main.html template to display the column headings.
For the sake of this action, summary columns generated with a wrapping function (e.g. max(colname)) are given a calculated column name in the form: colname__funcname
E.g. max(amount) would have the name amount__max for the purpose of this method's $col parameter.
string | $col | The name of the column for which to retrieve the label. |
Definition at line 373 of file summary_page.php.
handle | ( | $ | params | ) |
Entry point for the action.
Definition at line 97 of file summary_page.php.
isSelectedGroupField | ( | $ | fieldname | ) |
Checks whether a particular field is one of the currently selected group-by fields.
This is used from within the xataface/modules/summary/main.html template to show which of the grouped-by fields are selected in the select list.
string | $fieldname | The name of the field to check. |
Definition at line 410 of file summary_page.php.
isSelectedSummaryField | ( | $ | fieldname, |
$ | func = null |
||
) |
Checks whether a paricular field (and optionally function) are currently selected to be included as a column in the summary stats list.
This is used from within the xataface/modules/summary/main.html template to decide which of the possible summary fields should be selected in the select list.
string | $fieldname | The name of the field to check. |
string | $func | The name of the function to apply to the field. |
Definition at line 426 of file summary_page.php.
supports | ( | $ | fieldname, |
$ | funcname | ||
) |
Utility function to check if a particular aggregate function is supported on a particular column/field.
This is used from within the xataface/modules/summary/main.html template to decide which options to provide in the summary fields select list.
string | $fieldname | The name of the field to check. |
string | $funcname | The name of the function we are checking for eligibility. |
Definition at line 336 of file summary_page.php.