Class: I2CE CustomReport Display: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 85: Line 85:
===__construct()===
===__construct()===
The constuctor
The constuctor
@throws Excecption on error
*Signature: public function __construct($page,$view)
*Signature: public function __construct($page,$view)
Parameters:
*Parameters:
* [[Class: I2CE_Page | I2CE_Page]] $page
** [[Class: I2CE_Page | I2CE_Page]] $page
* [http://www.php.net/manual/en/language.types.string.php string ] $view
** [http://www.php.net/manual/en/language.types.string.php string ] $view @throws Excecption on error
===canView()===
===canView()===
Abstract method that each display is resposbile for implementing.  Checks to see
Abstract method that each display is resposbile for implementing.  Checks to see if it can display the given view.
if it can display the given view.
*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
not call the report display controls, limits etc. It will however still call processResults with a DOMNode of null
*Signature: public function display($contentNode,$processResults,$controls)
*Signature: public function display($contentNode,$processResults,$controls)
*Returns: boolean. true on sucess
*Parameters:
Parameters:
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode <br/>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
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode<br/>The DOM node we wish to display into. If null, we do not do any of the DOM processing stuff, do
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $processResults <br/>Defaults to true meaning we run through the results.  If false, we do not process results.
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $processResults<br/>Defaults to true meaning we run through the results.  If false, we do not process results.
***Default Value: true
**Default Value: true
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $controls <br/>If null (default), we display all the report controsl.  If string or an array of string, we only display the indicated controls
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $controls<br/>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
**Default Value: null
*Returns: boolean.<br/>true on sucess
===displayMetaInfo()===
===displayMetaInfo()===
*Signature: protected function displayMetaInfo($contentNode)
*Signature: protected function displayMetaInfo($contentNode)
Parameters:
*Parameters:
*$contentNode  
*$contentNode  
===displayReportControl()===
===displayReportControl()===
Adds any controls for this display to the content node
Adds any controls for this display to the content node
*Signature: protected function displayReportControl($contentNode)
*Signature: protected function displayReportControl($contentNode)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
===displayReportControls()===
===displayReportControls()===
Adds any report display controls that can be added for this view.
Adds any report display controls that can be added for this view. @param DOMNode $conentNode
@param DOMNode $conentNode
*Signature: protected function displayReportControls($contentNode,$controls)
*Signature: protected function displayReportControls($contentNode,$controls)
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] $true on success
*Parameters:
Parameters:
*$contentNode  
*$contentNode  
* [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $controls<br/>If null (default), we display all the report controsl.  If string or an array of string, we only display the indicated controls
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $controls <br/>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
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>$true on success
===displayReportLimit()===
===displayReportLimit()===
Adds the report limit node to its content node
Adds the report limit node to its content node @param DOMNode $limitnode
@param DOMNode $limitnode
*Signature: protected function displayReportLimit($contentNode,$limitNode,$limitConfig)
*Signature: protected function displayReportLimit($contentNode,$limitNode,$limitConfig)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
*$limitNode  
*$limitNode  
* [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $limitConfig
** [[Class: I2CE_MagicDataNode | I2CE_MagicDataNode]] $limitConfig
===displayReportLimits()===
===displayReportLimits()===
Displays any report limits in the content node
Displays any report limits in the content node
*Signature: protected function displayReportLimits($contentNode)
*Signature: protected function displayReportLimits($contentNode)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode
===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)
*Signature: protected function findNumericFields($disabled)
*Signature: protected function findNumericFields($disabled)
*Returns: @array.  Keys are report for fields and values are the data associate defined in getDisplayedFields()
*Parameters:
Parameters:
*$disabled  
*$disabled  
**Default Value: false  
***Default Value: false  
*Returns: @array.<br/>Keys are report for fields and values are the data associate defined in getDisplayedFields()
===getBasePage()===
===getBasePage()===
*Signature: protected function getBasePage()
*Signature: protected function getBasePage()
===getDefaultOptions()===
===getDefaultOptions()===
returns an array of the default display options.  Default options are read and overriddenb
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
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
*Signature: protected function getDefaultOptions($get,$options)
*Signature: protected function getDefaultOptions($get,$options)
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] array or false on failure
*Parameters:
Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $get
* [http://www.php.net/manual/en/language.types.array.php array ] $get
** [http://www.php.net/manual/en/language.types.array.php array ] $options <br/>Default to the empty array.  The options that we want to be already set before we start goinng through
* [http://www.php.net/manual/en/language.types.array.php array ] $options<br/>Default to the empty array.  The options that we want to be already set before we start goinng through
***Default Value: array()  
**Default Value: array()  
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>array or false on failure
===getDisplayFieldsData()===
===getDisplayFieldsData()===
Gets the data about the fields we are going to display.
Gets the data about the fields we are going to display.
Line 165: Line 154:
===getFormFieldObjects()===
===getFormFieldObjects()===
Get the form and field objects associated to a formfield string.
Get the form and field objects associated to a formfield string.
@parmam boolean $isReportForm Defaults to true.  If true we a sending a report form field
If false, we are working with a form field.
*Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
*Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
*Returns: array.  Index 0 is an I2CE_Form (on success, false on failure), Index 1 is an I2CE_FormField on succces, false on failure
*Parameters:
Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield <br/>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.
* [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield<br/>of the re[prt form "$form" "$form+$field"  or "$form+$field+$aggregate"
*$isReportForm  
*$isReportForm  
**Default Value: true
***Default Value: true
*Returns: array.<br/>Index 0 is an I2CE_Form (on success, false on failure), Index 1 is an I2CE_FormField on succces, false on failure
===getMappedValue()===
===getMappedValue()===
Gets the mapped value for a report form field.
Gets the mapped value for a report 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.
*Signature: protected function getMappedValue($reportformfield,$value,$isReportForm)
*Signature: protected function getMappedValue($reportformfield,$value,$isReportForm)
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] the origina value of  on failure, the mapped value on success
*Parameters:
Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield <br/>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.
* [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield<br/>or a report form field or a form field of the form "$reportform+$field" or "$reportform+$field+$aggreate" or "$form+field"
*$value  
*$value  
*$isReportForm  
*$isReportForm  
**Default Value: true
***Default Value: true
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>the origina value of  on failure, the mapped value on success
===getReportViewDisplayedFields()===
===getReportViewDisplayedFields()===
Returns an array in (default display order) with keys reportformfields and values an array with indices 'header', 'link'
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
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
*Signature: protected function getReportViewDisplayedFields($getDisabled,$all_aggregates)
*Signature: protected function getReportViewDisplayedFields($getDisabled,$all_aggregates)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $getDisabled <br/>Defaults to false;
***Default Value: false
*$all_aggregates
***Default Value: false
*Returns: array;
*Returns: array;
Parameters:
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $getDisabled<br/>Defaults to false;
**Default Value: false
*$all_aggregates
**Default Value: false
===getReportViewsFactory()===
===getReportViewsFactory()===
*Signature: protected function getReportViewsFactory()
*Signature: protected function getReportViewsFactory()
Line 203: Line 183:
@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.
*Signature: protected function getResults()
*Signature: protected function getResults()
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ] false on failure on succes an array. at index 'results' and  MDB2 buffered result object  at index 'num_results' the
*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
number of results that would be found without the limit
===getSwissReport()===
===getSwissReport()===
*Signature: protected function getSwissReport()
*Signature: protected function getSwissReport()
===getSwissReportFunction()===
===getSwissReportFunction()===
*Signature: protected function getSwissReportFunction($func)
*Signature: protected function getSwissReportFunction($func)
Parameters:
*Parameters:
*$func  
*$func  
===getSwissReportView()===
===getSwissReportView()===
Line 216: Line 195:
Checks to see if a form field is mapped
Checks to see if a form field is mapped
*Signature: protected function isMapped($reportformfield)
*Signature: protected function isMapped($reportformfield)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield<br/>of the form "$reportform+$fiedld(+$aggregate)"
** [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield <br/>of the form "$reportform+$fiedld(+$aggregate)"
===mapReportFormField()===
===mapReportFormField()===
Sets the maps
Sets the maps
*Signature: protected function mapReportFormField($reportformfield)
*Signature: protected function mapReportFormField($reportformfield)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield
** [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield
===mapResults()===
===mapResults()===
Maps any mapped  fields in a results.
Maps any mapped  fields in a results.
*Signature: protected function mapResults($result)
*Signature: protected function mapResults($result)
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] the mapped results
*Parameters:
Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $result <br/>A an array with inicies of the form "$reportform+$field(+$aggregate)"  with unmapped value
* [http://www.php.net/manual/en/language.types.array.php array ] $result<br/>A an array with inicies of the form "$reportform+$field(+$aggregate)"  with unmapped value
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>the mapped results
===processResultRow()===
===processResultRow()===
Process a result row.
Process a result row.
result offset.  Othwerwise, it starts counting form zero.
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Signature: protected function processResultRow($row,$row_num,$contentNode)
*Returns: boolean. True on success
*Parameters:
Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $row
* [http://www.php.net/manual/en/language.types.array.php array ] $row
** [http://www.php.net/manual/en/language.types.integer.php int ] $row_num <br/>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.
* [http://www.php.net/manual/en/language.types.integer.php int ] $row_num<br/>The current row number when processing results.  If there was a result limit, it starts the count from the beginning of the
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode <br/>Default to null. A node to append the result onto
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode<br/>Default to null. A node to append the result onto
***Default Value: null
**Default Value: null
*Returns: boolean.<br/>True on success
===processResults()===
===processResults()===
Process results
Process results
number of results.  (these values may be false on failure)
*Signature: protected function processResults($results_data,$contentNode)
*Signature: protected function processResults($results_data,$contentNode)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.array.php array ] $results_data<br/>an array of results.  indices are 'restults' and MDB2 Buffered result and 'num_results' the
** [http://www.php.net/manual/en/language.types.array.php array ] $results_data <br/>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)
* [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode<br/>Default to null a node to append the results onto
** [http://www.php.net/manual/en/class.domnode.php DOMNode ] $contentNode <br/>Default to null a node to append the results onto
**Default Value: null
***Default Value: null
===processWhere()===
===processWhere()===
Process the fields  to make limits based on their limiting values
Process the fields  to make limits based on their limiting values @param array $limits an array defining limiting values for particular fields
@param array $limits an array defining limiting values for particular fields
*Signature: protected function processWhere($limitValues)
*Signature: protected function processWhere($limitValues)
*Parameters:
*$limitValues
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]
Parameters:
*$limitValues
===processWhereByField()===
===processWhereByField()===
param I2CE_Form $formObj the instantiation of the form that the report form references
*Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles)
*Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $form<br/>the (report) form
** [http://www.php.net/manual/en/language.types.string.php string ] $form <br/>the (report) form
* [http://www.php.net/manual/en/language.types.string.php string ] $field<br/>the field
** [http://www.php.net/manual/en/language.types.string.php string ] $field <br/>the field param I2CE_Form $formObj the instantiation of the form that the report form references
*$formObj  
*$formObj  
* [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()===
*Signature: protected function processWhereByFunction($function,$limitStyles)
*Signature: protected function processWhereByFunction($function,$limitStyles)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $function
** [http://www.php.net/manual/en/language.types.string.php string ] $function
* [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()===
*Signature: public function saveDefaultView()
*Signature: public function saveDefaultView()
Line 272: Line 247:
*Signature: public function saveDisplayOptions()
*Signature: public function saveDisplayOptions()
===setupMappedValues()===
===setupMappedValues()===
Stores the array of mapped value for a formfield in  {@var $formfield}
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.
@parmam boolean $isReportForm Defaults to true.  If true we a sending a report form field
If false, we are working with a form field.
*Signature: protected function setupMappedValues($reportformfield,$isReportForm)
*Signature: protected function setupMappedValues($reportformfield,$isReportForm)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield
** [http://www.php.net/manual/en/language.types.string.php string ] $reportformfield
*$isReportForm  
*$isReportForm  
**Default Value: true
***Default Value: true
==Inherited Fuzzy Methods==
==Inherited Fuzzy Methods==
===userMessage()===
===userMessage()===

Revision as of 23:40, 16 October 2009

This article desrcibes the1 class I2CE_CustomReport_Display.

I2CE_CustomReport_Display

Variables

$formObjs

an array indexed by forms

  • Type: protected y $formObjs

$mappedFields

  • Type: protected $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

  • Type: protected $formMaps

$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)

  • Type: protected y $fieldMaps

$mappedValues

  • Type: protected $mappedValues

$display

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

  • Type: protected ng $display

$reportObj

$defaultOptions

The options for this display

  • Type: protected $defaultOptions

$view

the view we are displaying

  • Type: protected ng $view

$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

  • Type: protected y $numeric

$row_start

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

  • Type: protected mixed $row_start

$row_amount

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

  • Type: protected mixed $row_amount

$reportViewsFactory

  • Type: protected $reportViewsFactory

$displayedFields

  • Type: private $displayedFields

Methods

__construct()

The constuctor

  • Signature: public function __construct($page,$view)
  • Parameters:

canView()

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

  • Signature: abstract protected function canView()
  • Returns: boolean

display()

Display the report

  • 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()

  • Signature: protected function displayMetaInfo($contentNode)
  • Parameters:
  • $contentNode

displayReportControl()

Adds any controls for this display to the content node

  • Signature: protected function displayReportControl($contentNode)
  • Parameters:

displayReportControls()

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

  • 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

  • Signature: protected function displayReportLimit($contentNode,$limitNode,$limitConfig)
  • Parameters:
  • $limitNode

displayReportLimits()

Displays any report limits in the content node

  • Signature: protected function displayReportLimits($contentNode)
  • Parameters:

findNumericFields()

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

  • Signature: protected function findNumericFields($disabled)
  • Parameters:
  • $disabled
      • Default Value: false
  • Returns: @array.
    Keys are report for fields and values are the data associate defined in getDisplayedFields()

getBasePage()

  • Signature: protected function 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

  • Signature: protected function getDefaultOptions($get,$options)
  • Parameters:
    • array $get
    • array $options
      Default to the empty array. The options that we want to be already set before we start goinng through
      • Default Value: array()
  • Returns: mixed
    array or false on failure

getDisplayFieldsData()

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

  • Signature: protected function getDisplayFieldsData()

getFormFieldObjects()

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

  • 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.

  • 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

  • Signature: protected function getReportViewDisplayedFields($getDisabled,$all_aggregates)
  • Parameters:
    • boolean $getDisabled
      Defaults to false;
      • Default Value: false
  • $all_aggregates
      • Default Value: false
  • Returns: array;

getReportViewsFactory()

  • Signature: protected function getReportViewsFactory()

getResults()

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

  • Signature: protected function getResults()
  • Returns: mixed
    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()

  • Signature: protected function getSwissReport()

getSwissReportFunction()

  • Signature: protected function getSwissReportFunction($func)
  • Parameters:
  • $func

getSwissReportView()

  • Signature: protected function getSwissReportView()

isMapped()

Checks to see if a form field is mapped

  • Signature: protected function isMapped($reportformfield)
  • Parameters:
    • string $reportformfield
      of the form "$reportform+$fiedld(+$aggregate)"

mapReportFormField()

Sets the maps

  • Signature: protected function mapReportFormField($reportformfield)
  • Parameters:

mapResults()

Maps any mapped fields in a results.

  • Signature: protected function mapResults($result)
  • Parameters:
    • array $result
      A an array with inicies of the form "$reportform+$field(+$aggregate)" with unmapped value
  • Returns: array
    the mapped results

processResultRow()

Process a result row.

  • 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

  • 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

  • Signature: protected function processWhere($limitValues)
  • Parameters:
  • $limitValues
  • Returns: string

processWhereByField()

  • 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()

  • Signature: protected function processWhereByFunction($function,$limitStyles)
  • Parameters:
    • string $function
    • array $limitStyles
      the limit values for this formfield indexed by limit type

saveDefaultView()

  • Signature: public function saveDefaultView()

saveDisplayOptions()

  • Signature: public function 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.

  • Signature: protected function setupMappedValues($reportformfield,$isReportForm)
  • Parameters:
  • $isReportForm
      • Default Value: true

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()