Class: I2CE CustomReport Display: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 7: Line 7:
** [[Class: I2CE_CustomReport_Display_PieChart | I2CE_CustomReport_Display_PieChart]]
** [[Class: I2CE_CustomReport_Display_PieChart | I2CE_CustomReport_Display_PieChart]]
*Location: Part of the module [[I2CE Module List#CustomReports|CustomReports]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#CustomReports|CustomReports]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.1-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php modules/CustomReports/lib/I2CE_CustomReport_Display.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L29 modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 29
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
I2CE_CustomReport_Display
I2CE_CustomReport_Display
Line 13: Line 13:
===$formObjs===
===$formObjs===
an array indexed by  forms
an array indexed by  forms
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L35 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 35
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $formObjs
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $formObjs


===$mappedFields===
===$mappedFields===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L41 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 41
*Type: protected $mappedFields
*Type: protected $mappedFields


===$formMaps===
===$formMaps===
An array where keys are of the  "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later) @var protected array $maps
An array where keys are of the  "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later) @var protected array $maps
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L47 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 47
*Type: protected $formMaps
*Type: protected $formMaps


===$fieldMaps===
===$fieldMaps===
An array where keys are of the  "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later)
An array where keys are of the  "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L52 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 52
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $fieldMaps
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $fieldMaps


===$mappedValues===
===$mappedValues===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L57 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 57
*Type: protected $mappedValues
*Type: protected $mappedValues


===$display===
===$display===
The shortname for the display.  E.g. 'Default'
The shortname for the display.  E.g. 'Default'
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L63 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 63
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $display
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $display


===$reportObj===
===$reportObj===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L68 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 68
*Type: protected [[Class: I2CE_CustomReport | I2CE_CustomReport]] $reportObj
*Type: protected [[Class: I2CE_CustomReport | I2CE_CustomReport]] $reportObj


===$defaultOptions===
===$defaultOptions===
The options for this display
The options for this display
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L128 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 128
*Type: protected $defaultOptions
*Type: protected $defaultOptions


===$view===
===$view===
the view we are displaying
the view we are displaying
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L133 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 133
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $view
*Type: protected [http://www.php.net/manual/en/language.types.string.php string ] $view


===$page===
===$page===
The page we are displaying on
The page we are displaying on
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L138 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 138
*Type: protected [[Class: I2CE_Page | I2CE_Page]] $page
*Type: protected [[Class: I2CE_Page | I2CE_Page]] $page


===$template===
===$template===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L142 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 142
*Type: protected [[Class: I2CE_TemplateMeister | I2CE_TemplateMeister]] $template
*Type: protected [[Class: I2CE_TemplateMeister | I2CE_TemplateMeister]] $template


===$displayConfig===
===$displayConfig===
The magic data node which holds the information about the display that is being used
The magic data node which holds the information about the display that is being used
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L149 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 149
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $displayConfig
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $displayConfig


===$config===
===$config===
The magic data node which holds the information about this view
The magic data node which holds the information about this view
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L155 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 155
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $config
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $config


===$reportConfig===
===$reportConfig===
The magic data node which holds the information about the report this view referes to
The magic data node which holds the information about the report this view referes to
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L160 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 160
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $reportConfig
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $reportConfig


===$relationshipConfig===
===$relationshipConfig===
The magic data node which holds the information about the relationship this view refers to
The magic data node which holds the information about the relationship this view refers to
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L166 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 166
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $relationshipConfig
*Type: protected [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $relationshipConfig


===$numeric===
===$numeric===
array  with keys the 'reportformfields' and values the data associated to it. these fields are those we assume have a numeric representation
array  with keys the 'reportformfields' and values the data associated to it. these fields are those we assume have a numeric representation
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L182 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 182
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $numeric
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $numeric


===$row_start===
===$row_start===
The starting row (if any) for limiting the results. If not used, it is false mixed $row_start
The starting row (if any) for limiting the results. If not used, it is false mixed $row_start
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L422 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 422
*Type: protected procted $row_start
*Type: protected procted $row_start


===$row_amount===
===$row_amount===
The number of rows (if any) for limiting the results. If not used, it is false mixed $row_amount
The number of rows (if any) for limiting the results. If not used, it is false mixed $row_amount
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L427 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 427
*Type: protected procted $row_amount
*Type: protected procted $row_amount


===$reportViewsFactory===
===$reportViewsFactory===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L938 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 938
*Type: protected $reportViewsFactory
*Type: protected $reportViewsFactory


===$displayedFields===
===$displayedFields===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1325 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1325
*Type: private $displayedFields
*Type: private $displayedFields


Line 88: Line 108:
===__construct()===
===__construct()===
The constuctor
The constuctor
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L76 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 76
*Signature: public function __construct($page,$view)
*Signature: public function __construct($page,$view)
*Parameters:
*Parameters:
Line 94: Line 115:
===canView()===
===canView()===
Abstract method that each display is resposbile for implementing.  Checks to see if it can display the given view.
Abstract method that each display is resposbile for implementing.  Checks to see if it can display the given view.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L173 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 173
*Signature: abstract protected function canView()
*Signature: abstract protected function canView()
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]
===display()===
===display()===
Display the report
Display the report
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1162 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1162
*Signature: public function display($contentNode,$processResults,$controls)
*Signature: public function display($contentNode,$processResults,$controls)
*Parameters:
*Parameters:
Line 107: Line 130:
*Returns: boolean.<br/>true on sucess
*Returns: boolean.<br/>true on sucess
===displayMetaInfo()===
===displayMetaInfo()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1258 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1258
*Signature: protected function displayMetaInfo($contentNode)
*Signature: protected function displayMetaInfo($contentNode)
*Parameters:
*Parameters:
Line 112: Line 136:
===displayReportControl()===
===displayReportControl()===
Adds any controls for this display to the content node
Adds any controls for this display to the content node
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L903 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 903
*Signature: protected function displayReportControl($contentNode)
*Signature: protected function displayReportControl($contentNode)
*Parameters:
*Parameters:
Line 117: Line 142:
===displayReportControls()===
===displayReportControls()===
Adds any report display controls that can be added for this view. @param DOMNode $conentNode
Adds any report display controls that can be added for this view. @param DOMNode $conentNode
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L843 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 843
*Signature: protected function displayReportControls($contentNode,$controls)
*Signature: protected function displayReportControls($contentNode,$controls)
*Parameters:
*Parameters:
Line 125: Line 151:
===displayReportLimit()===
===displayReportLimit()===
Adds the report limit node to its content node @param DOMNode $limitnode
Adds the report limit node to its content node @param DOMNode $limitnode
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1111 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1111
*Signature: protected function displayReportLimit($contentNode,$limitNode,$limitConfig)
*Signature: protected function displayReportLimit($contentNode,$limitNode,$limitConfig)
*Parameters:
*Parameters:
Line 132: Line 159:
===displayReportLimits()===
===displayReportLimits()===
Displays any report limits in the content node
Displays any report limits in the content node
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1004 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1004
*Signature: protected function displayReportLimits($contentNode)
*Signature: protected function displayReportLimits($contentNode)
*Parameters:
*Parameters:
Line 137: Line 165:
===findNumericFields()===
===findNumericFields()===
Find the numeric fields.  Returns it (and stores in in the variable $this->numeric)
Find the numeric fields.  Returns it (and stores in in the variable $this->numeric)
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L190 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 190
*Signature: protected function findNumericFields($disabled)
*Signature: protected function findNumericFields($disabled)
*Parameters:
*Parameters:
Line 143: Line 172:
*Returns: @array.<br/>Keys are report for fields and values are the data associate defined in getDisplayedFields()
*Returns: @array.<br/>Keys are report for fields and values are the data associate defined in getDisplayedFields()
===getBasePage()===
===getBasePage()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L889 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 889
*Signature: protected function getBasePage()
*Signature: protected function getBasePage()
===getDefaultOptions()===
===getDefaultOptions()===
returns an array of the default display options.  Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value
returns an array of the default display options.  Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L789 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 789
*Signature: protected function getDefaultOptions($get,$options)
*Signature: protected function getDefaultOptions($get,$options)
*Parameters:
*Parameters:
Line 154: Line 185:
===getDisplayFieldsData()===
===getDisplayFieldsData()===
Gets the data about the fields we are going to display.
Gets the data about the fields we are going to display.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1333 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1333
*Signature: protected function getDisplayFieldsData()
*Signature: protected function getDisplayFieldsData()
===getFormFieldObjects()===
===getFormFieldObjects()===
Get the form and field objects associated to a formfield string.
Get the form and field objects associated to a formfield string.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L607 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 607
*Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
*Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
*Parameters:
*Parameters:
Line 165: Line 198:
===getMappedValue()===
===getMappedValue()===
Gets the mapped value for a report form field.
Gets the mapped value for a report form field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L451 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 451
*Signature: protected function getMappedValue($reportformfield,$value,$isReportForm)
*Signature: protected function getMappedValue($reportformfield,$value,$isReportForm)
*Parameters:
*Parameters:
Line 174: Line 208:
===getReportViewDisplayedFields()===
===getReportViewDisplayedFields()===
Returns an array in (default display order) with keys reportformfields and values an array with indices 'header', 'link' The value of 'header' is the display header for this field The value of 'link' is false if there is no linked page associtated to this field or a string if there is. @param Mixed $all_aggerates Defaults to false.  If true we include all information about aggregate and non-agregate versions of the fields. otherwise it can be an array of aggregate information that we want
Returns an array in (default display order) with keys reportformfields and values an array with indices 'header', 'link' The value of 'header' is the display header for this field The value of 'link' is false if there is no linked page associtated to this field or a string if there is. @param Mixed $all_aggerates Defaults to false.  If true we include all information about aggregate and non-agregate versions of the fields. otherwise it can be an array of aggregate information that we want
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1386 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1386
*Signature: protected function getReportViewDisplayedFields($getDisabled,$all_aggregates)
*Signature: protected function getReportViewDisplayedFields($getDisabled,$all_aggregates)
*Parameters:
*Parameters:
Line 182: Line 217:
*Returns: array;
*Returns: array;
===getReportViewsFactory()===
===getReportViewsFactory()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L939 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 939
*Signature: protected function getReportViewsFactory()
*Signature: protected function getReportViewsFactory()
===getResults()===
===getResults()===
@param array $limits an nested array defining limiting values for particular fields. Defaults to the empty array.
@param array $limits an nested array defining limiting values for particular fields. Defaults to the empty array.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L232 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 232
*Signature: protected function getResults()
*Signature: protected function getResults()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>false on failure on succes an array. at index 'results' and  MDB2 buffered result object  at index 'num_results' the number of results that would be found without the limit
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>false on failure on succes an array. at index 'results' and  MDB2 buffered result object  at index 'num_results' the number of results that would be found without the limit
===getSwissReport()===
===getSwissReport()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L977 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 977
*Signature: protected function getSwissReport()
*Signature: protected function getSwissReport()
===getSwissReportFunction()===
===getSwissReportFunction()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L986 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 986
*Signature: protected function getSwissReportFunction($func)
*Signature: protected function getSwissReportFunction($func)
*Parameters:
*Parameters:
**$func  
**$func  
===getSwissReportView()===
===getSwissReportView()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L969 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 969
*Signature: protected function getSwissReportView()
*Signature: protected function getSwissReportView()
===isMapped()===
===isMapped()===
Checks to see if a form field is mapped
Checks to see if a form field is mapped
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L547 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 547
*Signature: protected function isMapped($reportformfield)
*Signature: protected function isMapped($reportformfield)
*Parameters:
*Parameters:
Line 202: Line 243:
===mapReportFormField()===
===mapReportFormField()===
Sets the maps
Sets the maps
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L568 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 568
*Signature: protected function mapReportFormField($reportformfield)
*Signature: protected function mapReportFormField($reportformfield)
*Parameters:
*Parameters:
Line 207: Line 249:
===mapResults()===
===mapResults()===
Maps any mapped  fields in a results.
Maps any mapped  fields in a results.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L434 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 434
*Signature: protected function mapResults($result)
*Signature: protected function mapResults($result)
*Parameters:
*Parameters:
Line 213: Line 256:
===processResultRow()===
===processResultRow()===
Process a result row.
Process a result row.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1253 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1253
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Parameters:
*Parameters:
Line 222: Line 266:
===processResults()===
===processResults()===
Process results
Process results
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1219 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1219
*Signature: protected function processResults($results_data,$contentNode)
*Signature: protected function processResults($results_data,$contentNode)
*Parameters:
*Parameters:
Line 229: Line 274:
===processWhere()===
===processWhere()===
Process the fields  to make limits based on their limiting values @param array $limits an array defining limiting values for particular fields
Process the fields  to make limits based on their limiting values @param array $limits an array defining limiting values for particular fields
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L648 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 648
*Signature: protected function processWhere($limitValues)
*Signature: protected function processWhere($limitValues)
*Parameters:
*Parameters:
Line 234: Line 280:
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
===processWhereByField()===
===processWhereByField()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L695 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 695
*Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles)
*Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles)
*Parameters:
*Parameters:
Line 241: Line 288:
** [http://www.php.net/manual/en/language.types.array.php array ] $limitStyles <br/>the limit values for this formfield indexed by limit type
** [http://www.php.net/manual/en/language.types.array.php array ] $limitStyles <br/>the limit values for this formfield indexed by limit type
===processWhereByFunction()===
===processWhereByFunction()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L733 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 733
*Signature: protected function processWhereByFunction($function,$limitStyles)
*Signature: protected function processWhereByFunction($function,$limitStyles)
*Parameters:
*Parameters:
Line 246: Line 294:
** [http://www.php.net/manual/en/language.types.array.php array ] $limitStyles <br/>the limit values for this formfield indexed by limit type
** [http://www.php.net/manual/en/language.types.array.php array ] $limitStyles <br/>the limit values for this formfield indexed by limit type
===saveDefaultView()===
===saveDefaultView()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1129 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1129
*Signature: public function saveDefaultView()
*Signature: public function saveDefaultView()
===saveDisplayOptions()===
===saveDisplayOptions()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L1144 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 1144
*Signature: public function saveDisplayOptions()
*Signature: public function saveDisplayOptions()
===setupMappedValues()===
===setupMappedValues()===
Stores the array of mapped value for a formfield in  {@var $formfield} @parmam boolean $isReportForm Defaults to true.  If true we a sending a report form field If false, we are working with a form field.
Stores the array of mapped value for a formfield in  {@var $formfield} @parmam boolean $isReportForm Defaults to true.  If true we a sending a report form field If false, we are working with a form field.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/CustomReports/lib/I2CE_CustomReport_Display.php#L510 i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php] on line 510
*Signature: protected function setupMappedValues($reportformfield,$isReportForm)
*Signature: protected function setupMappedValues($reportformfield,$isReportForm)
*Parameters:
*Parameters:

Revision as of 09:48, 10 November 2009

This article describes the abstract class I2CE_CustomReport_Display.

I2CE_CustomReport_Display

Variables

$formObjs

an array indexed by forms

$mappedFields

$formMaps

An array where keys are of the "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later) @var protected array $maps

$fieldMaps

An array where keys are of the "$reportform(+field(+$aggregate))" and the values are the corresponding "$form+$field" (that is the real form for the later)

$mappedValues

$display

The shortname for the display. E.g. 'Default'

$reportObj

$defaultOptions

The options for this display

$view

the view we are displaying

$page

The page we are displaying on

$template

$displayConfig

The magic data node which holds the information about the display that is being used

$config

The magic data node which holds the information about this view

$reportConfig

The magic data node which holds the information about the report this view referes to

$relationshipConfig

The magic data node which holds the information about the relationship this view refers to

$numeric

array with keys the 'reportformfields' and values the data associated to it. these fields are those we assume have a numeric representation

$row_start

The starting row (if any) for limiting the results. If not used, it is false mixed $row_start

$row_amount

The number of rows (if any) for limiting the results. If not used, it is false mixed $row_amount

$reportViewsFactory

$displayedFields

Methods

__construct()

The constuctor

canView()

Abstract method that each display is resposbile for implementing. Checks to see if it can display the given view.

display()

Display the report

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 1162
  • Signature: public function display($contentNode,$processResults,$controls)
  • Parameters:
    • DOMNode $contentNode
      The DOM node we wish to display into. If null, we do not do any of the DOM processing stuff, do not call the report display controls, limits etc. It will however still call processResults with a DOMNode of null
    • boolean $processResults
      Defaults to true meaning we run through the results. If false, we do not process results.
      • Default Value: true
    • mixed $controls
      If null (default), we display all the report controsl. If string or an array of string, we only display the indicated controls
      • Default Value: null
  • Returns: boolean.
    true on sucess

displayMetaInfo()

displayReportControl()

Adds any controls for this display to the content node

displayReportControls()

Adds any report display controls that can be added for this view. @param DOMNode $conentNode

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 843
  • Signature: protected function displayReportControls($contentNode,$controls)
  • Parameters:
    • $contentNode
    • mixed $controls
      If null (default), we display all the report controsl. If string or an array of string, we only display the indicated controls
      • Default Value: null
  • Returns: boolean
    $true on success

displayReportLimit()

Adds the report limit node to its content node @param DOMNode $limitnode

displayReportLimits()

Displays any report limits in the content node

findNumericFields()

Find the numeric fields. Returns it (and stores in in the variable $this->numeric)

getBasePage()

getDefaultOptions()

returns an array of the default display options. Default options are read and overriddenb in the following order: /modules/CustomReports/displays/$display/display_options /modules/CustomReports/relationships/display_options/$display /modules/CustomReports/reports/display_options/$display /modules/CustomReports/reportViews/$view/display_options/$display Finally any options that have a key in $get are replaced by that value

getDisplayFieldsData()

Gets the data about the fields we are going to display.

getFormFieldObjects()

Get the form and field objects associated to a formfield string.

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 607
  • Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
  • Parameters:
    • string $reportformfield
      of the re[prt form "$form" "$form+$field" or "$form+$field+$aggregate" @parmam boolean $isReportForm Defaults to true. If true we a sending a report form field If false, we are working with a form field.
    • $isReportForm
      • Default Value: true
  • Returns: array.
    Index 0 is an I2CE_Form (on success, false on failure), Index 1 is an I2CE_FormField on succces, false on failure

getMappedValue()

Gets the mapped value for a report form field.

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 451
  • Signature: protected function getMappedValue($reportformfield,$value,$isReportForm)
  • Parameters:
    • string $reportformfield
      or a report form field or a form field of the form "$reportform+$field" or "$reportform+$field+$aggreate" or "$form+field" @param value @parmam boolean $isReportForm Defaults to true. If true we a sending a report form field If false, we are working with a form field.
    • $value
    • $isReportForm
      • Default Value: true
  • Returns: string
    the origina value of on failure, the mapped value on success

getReportViewDisplayedFields()

Returns an array in (default display order) with keys reportformfields and values an array with indices 'header', 'link' The value of 'header' is the display header for this field The value of 'link' is false if there is no linked page associtated to this field or a string if there is. @param Mixed $all_aggerates Defaults to false. If true we include all information about aggregate and non-agregate versions of the fields. otherwise it can be an array of aggregate information that we want

getReportViewsFactory()

getResults()

@param array $limits an nested array defining limiting values for particular fields. Defaults to the empty array.

getSwissReport()

getSwissReportFunction()

getSwissReportView()

isMapped()

Checks to see if a form field is mapped

mapReportFormField()

Sets the maps

mapResults()

Maps any mapped fields in a results.

processResultRow()

Process a result row.

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 1253
  • Signature: protected function processResultRow($row,$row_num,$contentNode)
  • Parameters:
    • array $row
    • int $row_num
      The current row number when processing results. If there was a result limit, it starts the count from the beginning of the result offset. Othwerwise, it starts counting form zero.
    • DOMNode $contentNode
      Default to null. A node to append the result onto
      • Default Value: null
  • Returns: boolean.
    True on success

processResults()

Process results

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 1219
  • Signature: protected function processResults($results_data,$contentNode)
  • Parameters:
    • array $results_data
      an array of results. indices are 'restults' and MDB2 Buffered result and 'num_results' the number of results. (these values may be false on failure)
    • DOMNode $contentNode
      Default to null a node to append the results onto
      • Default Value: null

processWhere()

Process the fields to make limits based on their limiting values @param array $limits an array defining limiting values for particular fields

processWhereByField()

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 695
  • Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles)
  • Parameters:
    • string $form
      the (report) form
    • string $field
      the field param I2CE_Form $formObj the instantiation of the form that the report form references
    • $formObj
    • array $limitStyles
      the limit values for this formfield indexed by limit type

processWhereByFunction()

saveDefaultView()

saveDisplayOptions()

setupMappedValues()

Stores the array of mapped value for a formfield in {@var $formfield} @parmam boolean $isReportForm Defaults to true. If true we a sending a report form field If false, we are working with a form field.

Inherited Methods

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()