Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Views

Class: I2CE CustomReport Display (4.1.12)

From IHRIS Wiki

Jump to: navigation, search


This article describes the abstract class I2CE_CustomReport_Display .

I2CE_CustomReport_Display

Contents

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

$limitDescText

The list of limits for this display.

$limitModules

The cache of module limits with description.

$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

$seen_merges

$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

$relationships

$reportViewsFactory

$displayed_limits

$displayedFields

Methods

__construct()

The constuctor

_displayReportFormLimit()

Displays any report limits in the content node

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 1804
  • Signature: protected function _displayReportFormLimit($reportform,$field,$limit,$contentNode,$rv_config,$reportConfig,$limitValues,$excludes,$merge)
  • Parameters:
    • $reportform
    • $field
    • $limit
    • DOMNode $contentNode
    • $rv_config
    • $reportConfig
    • $limitValues
    • $excludes
    • $merge
      • Default Value:

_displayReportFunctionLimit()

Displays any report limits in the content node

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 1858
  • Signature: protected function _displayReportFunctionLimit($function,$limit,$contentNode,$rv_config,$reportConfig,$limitValues,$excludes,$merge)
  • Parameters:
    • $function
    • $limit
    • DOMNode $contentNode
    • $rv_config
    • $reportConfig
    • $limitValues
    • $excludes
    • $merge
      • Default Value:

_displayReportInternalLimit()

Displays any report limits for internals in the content node

_displayReportLimits()

Displays any report limits in the content node

_getMergedReportData()

_getPivots()

_getReportViewDisplayedFieldsWalker()

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 2567
  • Signature: protected function _getReportViewDisplayedFieldsWalker($getDisabled,$all_aggregates,$baseConfig,$field_list,$parent_report,$parent_ref)
  • Parameters:
    • $getDisabled
    • $all_aggregates
    • $baseConfig
    • &$field_list
    • $parent_report
    • $parent_ref

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 2099
  • 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 1467
  • 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 1057
  • Signature: protected function getFormFieldObjects($reportformfield,$isReportForm)
  • Parameters:
    • string $reportformfield
      of the re[prt form "$form" "$form+$field" or "$form+$field+$aggregate" @parmam string $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 819
  • 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

getMergedReportJoins()

getModuleLimits()

Setup and return the module limits details.

getPivots()

getReportLimitsDescription()

Return a string representation of the limits for this report.

getReportPrefix()

Get the report results prefix for the DOM.

getReportViewDisplayedFields()

getReportViewsFactory()

getResults()

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 313
  • Signature: protected function getResults($check_restart)
  • Parameters:
    • boolean $check_restart
      defaults to true in which case if the results are paginated and the offeset is more than the number of results, we restart it setting the page to 1
      • Default Value: true
  • 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()

getSwissReportFunction()

getSwissReportInternal()

getSwissReportView()

isMapped()

Checks to see if a form field is mapped

mapReportFormField()

Sets the maps

mapResults()

Maps any mapped fields in a results.

mergeOn_child()

Generate SQL join statement for joining on the named parent form's id with the named child form on a given field @param string $childFormName the name of the child form in the relationship

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 770
  • Signature: protected function mergeOn_child($parent_merge_ref,$parent_form,$parent_field,$merge_ref,$child_form,$joinData,$conditions)
  • Parameters:
    • $parent_merge_ref
    • $parent_form
    • $parent_field
    • $merge_ref
    • $child_form
    • array $joinData
      The array containg the join data
    • $conditions
  • Returns: mixed.
    On success, a string which is the SQL join statement. On failure, false

mergeOn_child_field()

Generate SQL join statement for joining on the named parent form's id with the named child form on a given field @param string $childFormName the name of the child form in the relationship

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 752
  • Signature: protected function mergeOn_child_field($parent_merge_ref,$parent_form,$parent_field,$merge_ref,$child_form,$joinData,$conditions)
  • Parameters:
    • $parent_merge_ref
    • $parent_form
    • $parent_field
    • $merge_ref
    • $child_form
    • array $joinData
      The array containg the join data
    • $conditions
  • Returns: mixed.
    On success, a string which is the SQL join statement. On failure, false

mergeOn_parent()

Generate SQL join statement for joining on the named parent form's id with the named child form on a given field @param string $childFormName the name of the child form in the relationship

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 781
  • Signature: protected function mergeOn_parent($parent_merge_ref,$parent_form,$parent_field,$merge_ref,$child_form,$joinData,$conditions)
  • Parameters:
    • $parent_merge_ref
    • $parent_form
    • $parent_field
    • $merge_ref
    • $child_form
    • array $joinData
      The array containg the join data
    • &$conditions
  • Returns: mixed.
    On success, a string which is the SQL join statement. On failure, false

mergeOn_parent_field()

Generate SQL join statement for joining on the named parent form's id with the named child form on a given field @param string $childFormName the name of the child form in the relationship

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 733
  • Signature: protected function mergeOn_parent_field($parent_merge_ref,$parent_form,$parent_field,$merge_ref,$child_form,$joinData,$conditions)
  • Parameters:
    • $parent_merge_ref
    • $parent_form
    • $parent_field
    • $merge_ref
    • $child_form
    • array $joinData
      The array containg the join data
    • $conditions
  • Returns: mixed.
    On success, a string which is the SQL join statement. On failure, false

processResultRow()

Process a result row.

  • Defined in i2ce/modules/CustomReports/lib/I2CE_CustomReport_Display.php on line 2200
  • 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 2166
  • 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 1250
  • Signature: protected function processWhereByField($form,$field,$formObj,$limitStyles,$report)
  • 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
    • $report
      • Default Value: null

processWhereByFunction()

processWhereByInternal()

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.

unsetPaging()

Unset the limit_paginated option since doing it in the $_GET array won't work since no value would be set. This is mainly for other objects working with reports instead of the default report display.

validateSortFields()

Validates an array of fields to sort on

Inherited Methods

_hasMethod()

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

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()