Class: I2CE FormRelationship (Development): Difference between revisions
(Created page with '{{otherversions|Class: I2CE_FormRelationship}} This article describes the class ''I2CE_FormRelationship'' . *Extends the class: I2CE_Fuzzy. …') |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
This article describes the class ''I2CE_FormRelationship'' . | This article describes the class ''I2CE_FormRelationship'' . | ||
*Extends the class: [[Class: I2CE_Fuzzy (Development) | I2CE_Fuzzy]]. | *Extends the class: [[Class: I2CE_Fuzzy (Development) | I2CE_Fuzzy]]. | ||
*Location: Part of the module [[I2CE Module List (Development)#formRelationships|formRelationships]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Location: Part of the module [[I2CE Module List (Development)#formRelationships|formRelationships]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L29 modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 29 | ||
*Author: Carl Leitner <litlfred@ibiblio.org> | *Author: Carl Leitner <litlfred@ibiblio.org> | ||
I2CE_CustomRelationship | I2CE_CustomRelationship | ||
==Variables== | ==Variables== | ||
===$primaryForm=== | ===$primaryForm=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L33 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 33 | ||
*Type: protected $primaryForm | *Type: protected $primaryForm | ||
===$primaryFormName=== | ===$primaryFormName=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L34 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 34 | ||
*Type: protected $primaryFormName | *Type: protected $primaryFormName | ||
===$parentFormNames=== | ===$parentFormNames=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L35 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 35 | ||
*Type: protected $parentFormNames | *Type: protected $parentFormNames | ||
===$formConfigs=== | ===$formConfigs=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L36 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 36 | ||
*Type: protected $formConfigs | *Type: protected $formConfigs | ||
===$relationship=== | ===$relationship=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L37 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 37 | ||
*Type: protected $relationship | *Type: protected $relationship | ||
===$relConfig=== | ===$relConfig=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L38 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 38 | ||
*Type: protected $relConfig | *Type: protected $relConfig | ||
===$form_reference=== | ===$form_reference=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L39 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 39 | ||
*Type: protected $form_reference | *Type: protected $form_reference | ||
===$use_cache=== | |||
Defatuls to true. Set to use cache for getting values in relationship hierarchy | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L44 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 44 | |||
*Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $use_cache | |||
===$use_disp_fields=== | |||
@var boolean $use_displ_fields. Defaults to true. Whether or not to return the display fields when getting relationship data | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L61 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 61 | |||
*Type: protected $use_disp_fields | |||
===$funcDetails=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L653 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 653 | |||
*Type: protected $funcDetails | |||
===$operands=== | ===$operands=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | array $operands of string. The SQL operands recognzied | ||
*Type: static protected $operands | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L774 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 774 | ||
*Type: static protected static $operands | |||
===$additional_limits=== | |||
An array, indexed by report form names, of additional limits that are set for a relationship | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1933 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1933 | |||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $additional_limits | |||
==Methods== | ==Methods== | ||
===__construct()=== | ===__construct()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L89 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 89 | ||
*Signature: public function __construct($relationship,$ | *Signature: public function __construct($relationship,$relationship_base,$form_reference) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $relationship | ** [http://www.php.net/manual/en/language.types.string.php string ] $relationship | ||
**$relationship_base | |||
***Default Value: '/modules/CustomReports/relationships' | |||
** [http://www.php.net/manual/en/language.pseudo-types.php callback ] $form_reference | ** [http://www.php.net/manual/en/language.pseudo-types.php callback ] $form_reference | ||
**$ | ***Default Value: null | ||
===_getFunctionDetails()=== | |||
Get the array of function details at the specified for the specified function at the speci @var I2CE_MagicDataNode $funcConfig @var array $dependents A list of functions this function depends on | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L621 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 621 | |||
*Signature: protected function _getFunctionDetails($funcConfig,$dependents) | |||
*Parameters: | |||
**$funcConfig | |||
**$dependents | |||
===_getLimitingFields()=== | ===_getLimitingFields()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | internal function to get the fields which are in the limits for one where clause in a relationship @param array $limited_fields array of boolean indexed by the names of the fields | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L799 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 799 | |||
*Signature: protected function _getLimitingFields($whereConfig,$limiting_fields) | *Signature: protected function _getLimitingFields($whereConfig,$limiting_fields) | ||
*Parameters: | *Parameters: | ||
**$whereConfig | ** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $whereConfig | ||
**&$limiting_fields | **&$limiting_fields | ||
===_walkSatisfyingForms()=== | |||
Worker method to walk relationship hierarchy to get joined forms in relationship | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1803 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1803 | |||
*Signature: protected function _walkSatisfyingForms($formName,$form,$id,$fields,$ordering,$results) | |||
*Parameters: | |||
**$formName | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $form <br/>the form | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $id <br/>the id | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we wan returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
** [http://www.php.net/manual/en/language.types.array.php array ] &$results | |||
===addParentIdToWhereClause()=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L552 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 552 | |||
*Signature: protected function addParentIdToWhereClause($where,$parent_id) | |||
*Parameters: | |||
**&$where | |||
**$parent_id | |||
===disableCaching()=== | |||
to no use cache for getting values in relationship hierarchy | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L55 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 55 | |||
*Signature: public function disableCaching() | |||
===enableCaching()=== | |||
to use cache for getting values in relationship hierarchy | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L49 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 49 | |||
*Signature: public function enableCaching() | |||
===evaluateFunction()=== | |||
Evaluate a given relationship function on the given form data @param string $funciton | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L712 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 712 | |||
*Signature: public function evaluateFunction($function,$formData,$displayValue) | |||
*Parameters: | |||
**$function | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $formData <br/>of I2CE_Form as returend by the @getFormsSatisfyingRelationship() | |||
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $displayValue <br/>Defaults to true, in which case it returns the display value of the function. If false, it returns the DB value | |||
***Default Value: true | |||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | |||
===formSatisfiesRelationship()=== | |||
Checks to see if a given named form and id satisfies the relationship for the given primary form @param string $namedFormId. The id of the named form we wish to check. Can be either "$form|$id" oe "$id" | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L339 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 339 | |||
*Signature: public function formSatisfiesRelationship($form_id,$namedForm,$namedFormID) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $form_id <br/>Either an I2CE_Form instnace, a string ( the form id) or an array of string (priamry_form, id) for the primary form of the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $namedForm <br/>The name of the form in the relationship | |||
**$namedFormID | |||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ]<br/>or Null on failure | |||
===generateWhereClause()=== | ===generateWhereClause()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate the where clause for the join of a given named form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L831 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 831 | |||
*Signature: public function generateWhereClause($formName) | *Signature: public function generateWhereClause($formName) | ||
*Parameters: | *Parameters: | ||
**$formName | ** [http://www.php.net/manual/en/language.types.string.php string ] $formName | ||
*Returns: mixed.<br/>false on failure or a SQL string on success | |||
===getAdditionalLimits()=== | |||
Modifty the given where clause, if any, based on any additional limits that have been set for the named form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1948 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1948 | |||
*Signature: protected function getAdditionalLimits($formName,$where) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>the named form in the relationship | |||
** [http://www.php.net/manual/en/language.types.array.php array ] &$where <br/>the existing where clause | |||
===getAncestorFormNames()=== | |||
Get the named forms in the relationship which are ancestral to the given named form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1011 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1011 | |||
*Signature: public function getAncestorFormNames($childFormName) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string, the named ancestral forms | |||
===getChildFormNames()=== | |||
Get the named forms for the given named form upto a specified depth | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1046 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1046 | |||
*Signature: public function getChildFormNames($formName,$depth) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName @var int $depth. Defaults to 1 in which case we only get the immediate children. If depth = null, we get all child forms | |||
**$depth | |||
***Default Value: 1 | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] | |||
===getForm()=== | ===getForm()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Returns the form for a given named form in the relationship | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L120 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 120 | |||
*Signature: public function getForm($formname) | *Signature: public function getForm($formname) | ||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formname | |||
*Returns: mixed.<br/>A string, the form, on success. false on failure | |||
===getFormConfig()=== | |||
Get the magic data node(s) for the name form in the relationship @param string $form. | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L212 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 212 | |||
*Signature: public function getFormConfig($formname) | |||
*Parameters: | *Parameters: | ||
**$formname | **$formname | ||
=== | ***Default Value: null | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Returns: mixed.<br/>false on failture. If $forname is null, we return an array of I2CE_MagicDataNodes index by the form names. If $formma,e is a string then we return the config for the named form. | ||
*Signature: public function | ===getFormData()=== | ||
Get the forms that satisfy a relationship for the given primary form id | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1734 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1734 | |||
*Signature: public function getFormData($form,$id,$fields,$ordering,$as_iterator) | |||
*Parameters: | *Parameters: | ||
**$form | **$form | ||
***Default Value: | ** [http://www.php.net/manual/en/language.types.string.php string ] $id <br/>the id of the primary form | ||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we wan returned | |||
***Default Value: array() | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
***Default Value: array() | |||
**$as_iterator | |||
***Default Value: true | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of mixed. The array may be empty if the $form_id does not satisfy the relationship. It is indexed by the named form and the form objects are already populated. If there was no matching form for a given named form, then the value of the array elemet will be false | |||
===getFormDataJoiningByID()=== | |||
Find all form ids matching the given join | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1830 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1830 | |||
*Signature: public function getFormDataJoiningByID($formName,$parentForm,$parentId,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>The named form | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm <br/>The parent of this form | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId <br/>The id of the parent of this form | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we wan returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] | |||
===getFormDataJoiningByID_child()=== | |||
Get the forms ids for joining on the named parent forms if with the parent of the named child form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2158 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2158 | |||
*Signature: public function getFormDataJoiningByID_child($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_child_field()=== | |||
Get the forms ids for joining on the named parent form's id with the named child form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2200 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2200 | |||
*Signature: public function getFormDataJoiningByID_child_field($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_fields()=== | |||
Get the forms ids for joining on a given field of a named child form's with the named parent form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2250 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2250 | |||
*Signature: public function getFormDataJoiningByID_fields($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_ids()=== | |||
Get the forms ids for joining on ids of the named parent/child forms | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2118 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2118 | |||
*Signature: public function getFormDataJoiningByID_ids($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_parent()=== | |||
Get the forms ids for joining as the named child form's id with the parent of the named parent form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1975 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1975 | |||
*Signature: public function getFormDataJoiningByID_parent($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_parent_field()=== | |||
Get the forms ids for joining as a named child form's id with the named parent form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2019 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2019 | |||
*Signature: public function getFormDataJoiningByID_parent_field($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentForm | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parentId | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $fields <br/>keys are relationship formnames, values are array of fields we want returned | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $ordering <br/>keys are relationship formnames, values are array of fields we want ordered by | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormDataJoiningByID_reference()=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L2063 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 2063 | |||
*Signature: public function getFormDataJoiningByID_reference($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering) | |||
*Parameters: | |||
**$childFormName | |||
**$parentForm | |||
**$parentId | |||
**$joinData | |||
**$where | |||
**$limit | |||
**$fields | |||
**$ordering | |||
===getFormIdsJoiningOn()=== | |||
Find all form ids matching the given join | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L447 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 447 | |||
*Signature: public function getFormIdsJoiningOn($formName,$parentFormObj) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>The named form | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj <br/>The parent of this form | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string, the form ids | |||
===getFormIdsJoiningOn_child()=== | |||
Get the forms ids for joining on the named parent forms if with the parent of the named child form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1450 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1450 | |||
*Signature: public function getFormIdsJoiningOn_child($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_child_field()=== | |||
Get the forms ids for joining on the named parent form's id with the named child form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1550 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1550 | |||
*Signature: public function getFormIdsJoiningOn_child_field($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_fields()=== | |||
Get the forms ids for joining on a given field of a named child form's with the named parent form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1625 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1625 | |||
*Signature: public function getFormIdsJoiningOn_fields($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_ids()=== | |||
Get the forms ids for joining on ids of the named parent/child forms | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1400 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1400 | |||
*Signature: public function getFormIdsJoiningOn_ids($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_parent()=== | |||
Get the forms ids for joining as the named child form's id with the parent of the named parent form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1199 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1199 | |||
*Signature: public function getFormIdsJoiningOn_parent($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_parent_field()=== | |||
Get the forms ids for joining as a named child form's id with the named parent form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1325 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1325 | |||
*Signature: public function getFormIdsJoiningOn_parent_field($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormIdsJoiningOn_reference()=== | |||
Get the forms ids for joining as a named child form's id with the named parent form on a given field | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1251 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1251 | |||
*Signature: public function getFormIdsJoiningOn_reference($childFormName,$parentFormObj,$joinData,$where,$limit) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | |||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $where | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $limit | |||
*Returns: mixed.<br/>An array of form ids | |||
===getFormNames()=== | ===getFormNames()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the names of the forms in the relationship | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L271 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 271 | |||
*Signature: public function getFormNames() | *Signature: public function getFormNames() | ||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string. | |||
===getForms()=== | ===getForms()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Internal method to walk the relationship and get all the form configs and parent form names and store them in arrays | ||
*Signature: protected function getForms($config,$formConfigs,$parentForms,$parent_form_name) | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L189 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 189 | ||
*Signature: protected function getForms($config,$formConfigs,$parentForms,$parent_form_name,$depth) | |||
*Parameters: | |||
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $config <br/>The node we are walking | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $formConfigs <br/>The array we are storing magic data nodes. Indexed by named forms | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $parentForms <br/>The array of string which maps the named parent form of a named form | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $parent_form_name <br/>The name of the parent form for the given $config | |||
**$depth | |||
***Default Value: 0 | |||
===getFormsSatisfyingRelationship()=== | |||
Get the forms that satisfy a relationship for the given primary form id | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L366 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 366 | |||
*Signature: public function getFormsSatisfyingRelationship($form_id) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $form_id <br/>Either an I2CE_Form instnace, a string ( the form id) or an array of string (priamry_form, id) for the primary form of the relationship | ||
* | *Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of mixed. The array may be empty if the $form_id does not satisfy the relationship. It is indexed by the named form and the form objects are already populated. If there was no matching form for a given named form, then the value of the array elemet will be false | ||
===getFunctionDetails()=== | ===getFunctionDetails()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the details of a relationship function | ||
*Signature: public function getFunctionDetails($function) | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L661 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 661 | ||
*Signature: public function getFunctionDetails($functions) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $functions <br/>string or an array of string | |||
*Returns: mixed.<br/>false on failure. On success an array with the keys 'qry' the query string, 'type' the return SQL type of the function, 'required_fields' the form fields reuquired in the relationship, and 'field' which is an instance of I2CE_FormField for the function | |||
===getFunctionDetailsWalker()=== | |||
Walks the function data tree to creates the list of function details | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L595 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 595 | |||
*Signature: protected function getFunctionDetailsWalker($config,$functions,$dependents) | |||
*Parameters: | *Parameters: | ||
**$ | ** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $config | ||
** [http://www.php.net/manual/en/language.types.array.php array ] &$functions <br/>The working list fo functions. | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $dependents <br/>Defaul to empty array. The functions that all the functions at this level depend on | |||
***Default Value: array() | |||
===getJoin()=== | ===getJoin()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the SQL join statemetn for the given form | ||
*Signature: public function getJoin($ | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1078 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1078 | ||
*Signature: public function getJoin($childFormName,$join_method) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the named form in the relationship | |||
**$join_method | |||
***Default Value: 'JOIN' | |||
*Returns: mixed.<br/>String, the SQL join statements on succes, false on failure | |||
===getJoiningFields()=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1674 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1674 | |||
*Signature: public function getJoiningFields($childFormName) | |||
*Parameters: | *Parameters: | ||
**$ | **$childFormName | ||
===getLimitingFields()=== | ===getLimitingFields()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Gets the names of the fields which are in a limit for a where clause of a given form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L781 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 781 | |||
*Signature: public function getLimitingFields($formName) | *Signature: public function getLimitingFields($formName) | ||
*Parameters: | *Parameters: | ||
**$formName | ** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>The anmed form in the relationship | ||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string, the fields that are present in the limit | |||
===getLinkingData()=== | |||
Get linking data, if any, for the indicated field of the named form @param string $joinForm the named form we are trying to join | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L862 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 862 | |||
*Signature: protected function getLinkingData($formName,$fieldName,$joinFormName,$joinField,$style,$reversed,$primary_table) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>The named form in the relationship | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $fieldName <br/>The field name | |||
**$joinFormName | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $joinField <br/>The field of the joined form we are looking for | |||
**$style | |||
***Default Value: 'default' | |||
**$reversed | |||
***Default Value: false | |||
**$primary_table | |||
***Default Value: 'primary_table' | |||
*Returns: [http://www.php.net/manual/en/language.pseudo-types.php mixed ]<br/>If no linking data then return false. Otherwise is in an array with keys sub_select, forms and fields | |||
===getParentFormNames()=== | ===getParentFormNames()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the name(s) of parent forms | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L230 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 230 | |||
*Signature: public function getParentFormNames($formname) | *Signature: public function getParentFormNames($formname) | ||
*Parameters: | *Parameters: | ||
**$formname | ** [http://www.php.net/manual/en/language.types.string.php string ] $formname | ||
***Default Value: null | ***Default Value: null | ||
*Returns: mixed.<br/>If $formname is null we return an array index by relationship form names of all the parent forms. If $formname is a string, it is the parentform name, if it exists of false otherwise. | |||
===getPrimaryForm()=== | ===getPrimaryForm()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the primary form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L246 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 246 | |||
*Signature: public function getPrimaryForm() | *Signature: public function getPrimaryForm() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | |||
===getPrimaryFormName()=== | ===getPrimaryFormName()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Gets the name of the primary from (e.g. the name of the relationship) | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L254 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 254 | |||
*Signature: public function getPrimaryFormName() | *Signature: public function getPrimaryFormName() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | |||
===getReferencedForm()=== | ===getReferencedForm()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Get the SQL name of a form via the registered callback functin | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L575 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 575 | |||
*Signature: public function getReferencedForm($form) | *Signature: public function getReferencedForm($form) | ||
*Parameters: | *Parameters: | ||
**$form | ** [http://www.php.net/manual/en/language.types.string.php string ] $form | ||
=== | *Returns: mixed.<br/>False on failure. A string on success | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | ===getRelationship()=== | ||
*Signature: public function | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L81 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 81 | ||
*Signature: public function getRelationship() | |||
===getRequiredForms()=== | ===getRequiredForms()=== | ||
Gets the forms required by the relationship | Gets the forms required by the relationship | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L135 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 135 | ||
*Signature: public function getRequiredForms() | *Signature: public function getRequiredForms() | ||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string | *Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string | ||
===hasAncestor()=== | |||
Determine if the form name given has ancestral conditions. | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L297 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 297 | |||
*Signature: public function hasAncestor($formName) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName | |||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | |||
===isJoin()=== | |||
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L315 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 315 | |||
*Signature: public function isJoin($formName) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName | |||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | |||
===isPrimaryFormName()=== | ===isPrimaryFormName()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Check to see if the given form name is the primary form name. Note the primary form name is the same as the relationship name | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L262 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 262 | |||
*Signature: public function isPrimaryFormName($formname) | *Signature: public function isPrimaryFormName($formname) | ||
*Parameters: | *Parameters: | ||
**$formname | ** [http://www.php.net/manual/en/language.types.string.php string ] $formname | ||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | |||
===isRightJoin()=== | |||
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L326 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 326 | |||
*Signature: public function isRightJoin($formName) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName | |||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | |||
===joinOn_child()=== | ===joinOn_child()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining on the named parent forms if with the parent of the named child form | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1431 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1431 | ||
*Signature: public function joinOn_child($childFormName,$joinData) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | ||
**$joinData | ** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_child_field()=== | ===joinOn_child_field()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining on the named parent form's id with the named child form on a given field | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1474 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1474 | ||
*Signature: public function joinOn_child_field($childFormName,$joinData) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | ||
**$joinData | ** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_fields()=== | ===joinOn_fields()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining on a given field of a named child form's with the named parent form on a given field | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1593 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1593 | ||
*Signature: public function joinOn_fields($childFormName,$joinData) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | ||
**$joinData | ** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_ids()=== | ===joinOn_ids()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining on ids of the named parent/child forms | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1381 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1381 | ||
*Signature: public function joinOn_ids($childFormName,$joinData) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | ||
**$joinData | ** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_parent()=== | ===joinOn_parent()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining as the named child form's id with the parent of the named parent form | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1181 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1181 | ||
*Signature: public function joinOn_parent($childFormName,$joinData) | |||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the name of the child form in the relationship | ||
**$joinData | ** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_parent_field()=== | ===joinOn_parent_field()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | Generate SQL join statement for joining as a named child form's id with the named parent form on a given field @param string $childForm the name of the child form in the relationship | ||
*Signature: | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1291 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1291 | ||
*Signature: public function joinOn_parent_field($childFormName,$joinData) | |||
*Parameters: | |||
**$childFormName | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===joinOn_reference()=== | |||
Generate SQL join statement for joining as a named child form's id with the named parent form on a given field @param string $childForm the name of the child form in the relationship | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1225 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1225 | |||
*Signature: public function joinOn_reference($childFormName,$joinData) | |||
*Parameters: | |||
**$childFormName | |||
** [http://www.php.net/manual/en/language.types.array.php array ] $joinData <br/>The array containg the join data | |||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | |||
===limitOne()=== | |||
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L281 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 281 | |||
*Signature: public function limitOne($formName) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName | |||
*Returns: [http://www.php.net/manual/en/language.types.boolean.php boolean ] | |||
===setAdditionalLimit()=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1939 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1939 | |||
*Signature: public function setAdditionalLimit($formName,$where) | |||
*Parameters: | *Parameters: | ||
**$ | **$formName | ||
**$ | **$where | ||
===useDisplayFields()=== | |||
Set the relationship to use the display fields when getting form data | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L65 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 65 | |||
*Signature: public function useDisplayFields() | |||
===useRawFields()=== | |||
Set the relationship to use the raw data when getting form data | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L71 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 71 | |||
*Signature: public function useRawFields() | |||
===usesRawFields()=== | |||
check if the relationship to use the raw data when getting form data | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L77 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 77 | |||
*Signature: public function usesRawFields() | |||
==Inherited Methods== | ==Inherited Methods== | ||
===_hasMethod()=== | ===_hasMethod()=== |
Latest revision as of 08:14, 6 May 2015
This article describes the class I2CE_FormRelationship .
- Extends the class: I2CE_Fuzzy.
- Location: Part of the module formRelationships in the package I2CE 4.1-dev
- Source: Defined in the file modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 29
- Author: Carl Leitner <litlfred@ibiblio.org>
I2CE_CustomRelationship
Variables
$primaryForm
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 33
- Type: protected $primaryForm
$primaryFormName
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 34
- Type: protected $primaryFormName
$parentFormNames
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 35
- Type: protected $parentFormNames
$formConfigs
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 36
- Type: protected $formConfigs
$relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 37
- Type: protected $relationship
$relConfig
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 38
- Type: protected $relConfig
$form_reference
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 39
- Type: protected $form_reference
$use_cache
Defatuls to true. Set to use cache for getting values in relationship hierarchy
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 44
- Type: protected boolean $use_cache
$use_disp_fields
@var boolean $use_displ_fields. Defaults to true. Whether or not to return the display fields when getting relationship data
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 61
- Type: protected $use_disp_fields
$funcDetails
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 653
- Type: protected $funcDetails
$operands
array $operands of string. The SQL operands recognzied
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 774
- Type: static protected static $operands
$additional_limits
An array, indexed by report form names, of additional limits that are set for a relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1933
- Type: protected array $additional_limits
Methods
__construct()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 89
- Signature: public function __construct($relationship,$relationship_base,$form_reference)
- Parameters:
_getFunctionDetails()
Get the array of function details at the specified for the specified function at the speci @var I2CE_MagicDataNode $funcConfig @var array $dependents A list of functions this function depends on
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 621
- Signature: protected function _getFunctionDetails($funcConfig,$dependents)
- Parameters:
- $funcConfig
- $dependents
_getLimitingFields()
internal function to get the fields which are in the limits for one where clause in a relationship @param array $limited_fields array of boolean indexed by the names of the fields
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 799
- Signature: protected function _getLimitingFields($whereConfig,$limiting_fields)
- Parameters:
- I2CE_MagicDataNode $whereConfig
- &$limiting_fields
_walkSatisfyingForms()
Worker method to walk relationship hierarchy to get joined forms in relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1803
- Signature: protected function _walkSatisfyingForms($formName,$form,$id,$fields,$ordering,$results)
- Parameters:
addParentIdToWhereClause()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 552
- Signature: protected function addParentIdToWhereClause($where,$parent_id)
- Parameters:
- &$where
- $parent_id
disableCaching()
to no use cache for getting values in relationship hierarchy
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 55
- Signature: public function disableCaching()
enableCaching()
to use cache for getting values in relationship hierarchy
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 49
- Signature: public function enableCaching()
evaluateFunction()
Evaluate a given relationship function on the given form data @param string $funciton
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 712
- Signature: public function evaluateFunction($function,$formData,$displayValue)
- Parameters:
- Returns: string
formSatisfiesRelationship()
Checks to see if a given named form and id satisfies the relationship for the given primary form @param string $namedFormId. The id of the named form we wish to check. Can be either "$form|$id" oe "$id"
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 339
- Signature: public function formSatisfiesRelationship($form_id,$namedForm,$namedFormID)
- Parameters:
- Returns: boolean
or Null on failure
generateWhereClause()
Generate the where clause for the join of a given named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 831
- Signature: public function generateWhereClause($formName)
- Parameters:
- string $formName
- Returns: mixed.
false on failure or a SQL string on success
getAdditionalLimits()
Modifty the given where clause, if any, based on any additional limits that have been set for the named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1948
- Signature: protected function getAdditionalLimits($formName,$where)
- Parameters:
getAncestorFormNames()
Get the named forms in the relationship which are ancestral to the given named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1011
- Signature: public function getAncestorFormNames($childFormName)
- Parameters:
- string $childFormName
- Returns: array
of string, the named ancestral forms
getChildFormNames()
Get the named forms for the given named form upto a specified depth
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1046
- Signature: public function getChildFormNames($formName,$depth)
- Parameters:
- string $formName @var int $depth. Defaults to 1 in which case we only get the immediate children. If depth = null, we get all child forms
- $depth
- Default Value: 1
- Returns: array
getForm()
Returns the form for a given named form in the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 120
- Signature: public function getForm($formname)
- Parameters:
- string $formname
- Returns: mixed.
A string, the form, on success. false on failure
getFormConfig()
Get the magic data node(s) for the name form in the relationship @param string $form.
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 212
- Signature: public function getFormConfig($formname)
- Parameters:
- $formname
- Default Value: null
- $formname
- Returns: mixed.
false on failture. If $forname is null, we return an array of I2CE_MagicDataNodes index by the form names. If $formma,e is a string then we return the config for the named form.
getFormData()
Get the forms that satisfy a relationship for the given primary form id
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1734
- Signature: public function getFormData($form,$id,$fields,$ordering,$as_iterator)
- Parameters:
- $form
- string $id
the id of the primary form - array $fields
keys are relationship formnames, values are array of fields we wan returned- Default Value: array()
- array $ordering
keys are relationship formnames, values are array of fields we want ordered by- Default Value: array()
- $as_iterator
- Default Value: true
- Returns: array
of mixed. The array may be empty if the $form_id does not satisfy the relationship. It is indexed by the named form and the form objects are already populated. If there was no matching form for a given named form, then the value of the array elemet will be false
getFormDataJoiningByID()
Find all form ids matching the given join
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1830
- Signature: public function getFormDataJoiningByID($formName,$parentForm,$parentId,$fields,$ordering)
- Parameters:
- string $formName
The named form - string $parentForm
The parent of this form - string $parentId
The id of the parent of this form - array $fields
keys are relationship formnames, values are array of fields we wan returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $formName
- Returns: array
getFormDataJoiningByID_child()
Get the forms ids for joining on the named parent forms if with the parent of the named child form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2158
- Signature: public function getFormDataJoiningByID_child($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_child_field()
Get the forms ids for joining on the named parent form's id with the named child form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2200
- Signature: public function getFormDataJoiningByID_child_field($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_fields()
Get the forms ids for joining on a given field of a named child form's with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2250
- Signature: public function getFormDataJoiningByID_fields($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_ids()
Get the forms ids for joining on ids of the named parent/child forms
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2118
- Signature: public function getFormDataJoiningByID_ids($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_parent()
Get the forms ids for joining as the named child form's id with the parent of the named parent form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1975
- Signature: public function getFormDataJoiningByID_parent($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_parent_field()
Get the forms ids for joining as a named child form's id with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2019
- Signature: public function getFormDataJoiningByID_parent_field($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- string $childFormName
the name of the child form in the relationship - string $parentForm
- string $parentId
- array $joinData
The array containg the join data - array $where
- array $limit
- array $fields
keys are relationship formnames, values are array of fields we want returned - array $ordering
keys are relationship formnames, values are array of fields we want ordered by
- string $childFormName
- Returns: mixed.
An array of form ids
getFormDataJoiningByID_reference()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 2063
- Signature: public function getFormDataJoiningByID_reference($childFormName,$parentForm,$parentId,$joinData,$where,$limit,$fields,$ordering)
- Parameters:
- $childFormName
- $parentForm
- $parentId
- $joinData
- $where
- $limit
- $fields
- $ordering
getFormIdsJoiningOn()
Find all form ids matching the given join
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 447
- Signature: public function getFormIdsJoiningOn($formName,$parentFormObj)
- Parameters:
- Returns: array
of string, the form ids
getFormIdsJoiningOn_child()
Get the forms ids for joining on the named parent forms if with the parent of the named child form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1450
- Signature: public function getFormIdsJoiningOn_child($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_child_field()
Get the forms ids for joining on the named parent form's id with the named child form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1550
- Signature: public function getFormIdsJoiningOn_child_field($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_fields()
Get the forms ids for joining on a given field of a named child form's with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1625
- Signature: public function getFormIdsJoiningOn_fields($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_ids()
Get the forms ids for joining on ids of the named parent/child forms
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1400
- Signature: public function getFormIdsJoiningOn_ids($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_parent()
Get the forms ids for joining as the named child form's id with the parent of the named parent form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1199
- Signature: public function getFormIdsJoiningOn_parent($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_parent_field()
Get the forms ids for joining as a named child form's id with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1325
- Signature: public function getFormIdsJoiningOn_parent_field($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormIdsJoiningOn_reference()
Get the forms ids for joining as a named child form's id with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1251
- Signature: public function getFormIdsJoiningOn_reference($childFormName,$parentFormObj,$joinData,$where,$limit)
- Parameters:
- Returns: mixed.
An array of form ids
getFormNames()
Get the names of the forms in the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 271
- Signature: public function getFormNames()
- Returns: array
of string.
getForms()
Internal method to walk the relationship and get all the form configs and parent form names and store them in arrays
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 189
- Signature: protected function getForms($config,$formConfigs,$parentForms,$parent_form_name,$depth)
- Parameters:
- I2CE_MagicDataNode $config
The node we are walking - array $formConfigs
The array we are storing magic data nodes. Indexed by named forms - array $parentForms
The array of string which maps the named parent form of a named form - string $parent_form_name
The name of the parent form for the given $config - $depth
- Default Value: 0
- I2CE_MagicDataNode $config
getFormsSatisfyingRelationship()
Get the forms that satisfy a relationship for the given primary form id
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 366
- Signature: public function getFormsSatisfyingRelationship($form_id)
- Parameters:
- mixed $form_id
Either an I2CE_Form instnace, a string ( the form id) or an array of string (priamry_form, id) for the primary form of the relationship
- mixed $form_id
- Returns: array
of mixed. The array may be empty if the $form_id does not satisfy the relationship. It is indexed by the named form and the form objects are already populated. If there was no matching form for a given named form, then the value of the array elemet will be false
getFunctionDetails()
Get the details of a relationship function
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 661
- Signature: public function getFunctionDetails($functions)
- Parameters:
- mixed $functions
string or an array of string
- mixed $functions
- Returns: mixed.
false on failure. On success an array with the keys 'qry' the query string, 'type' the return SQL type of the function, 'required_fields' the form fields reuquired in the relationship, and 'field' which is an instance of I2CE_FormField for the function
getFunctionDetailsWalker()
Walks the function data tree to creates the list of function details
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 595
- Signature: protected function getFunctionDetailsWalker($config,$functions,$dependents)
- Parameters:
- I2CE_MagicDataNode $config
- array &$functions
The working list fo functions. - array $dependents
Defaul to empty array. The functions that all the functions at this level depend on- Default Value: array()
getJoin()
Get the SQL join statemetn for the given form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1078
- Signature: public function getJoin($childFormName,$join_method)
- Parameters:
- string $childFormName
the named form in the relationship - $join_method
- Default Value: 'JOIN'
- string $childFormName
- Returns: mixed.
String, the SQL join statements on succes, false on failure
getJoiningFields()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1674
- Signature: public function getJoiningFields($childFormName)
- Parameters:
- $childFormName
getLimitingFields()
Gets the names of the fields which are in a limit for a where clause of a given form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 781
- Signature: public function getLimitingFields($formName)
- Parameters:
- string $formName
The anmed form in the relationship
- string $formName
- Returns: array
of string, the fields that are present in the limit
getLinkingData()
Get linking data, if any, for the indicated field of the named form @param string $joinForm the named form we are trying to join
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 862
- Signature: protected function getLinkingData($formName,$fieldName,$joinFormName,$joinField,$style,$reversed,$primary_table)
- Parameters:
- Returns: mixed
If no linking data then return false. Otherwise is in an array with keys sub_select, forms and fields
getParentFormNames()
Get the name(s) of parent forms
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 230
- Signature: public function getParentFormNames($formname)
- Parameters:
- string $formname
- Default Value: null
- string $formname
- Returns: mixed.
If $formname is null we return an array index by relationship form names of all the parent forms. If $formname is a string, it is the parentform name, if it exists of false otherwise.
getPrimaryForm()
Get the primary form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 246
- Signature: public function getPrimaryForm()
- Returns: string
getPrimaryFormName()
Gets the name of the primary from (e.g. the name of the relationship)
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 254
- Signature: public function getPrimaryFormName()
- Returns: string
getReferencedForm()
Get the SQL name of a form via the registered callback functin
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 575
- Signature: public function getReferencedForm($form)
- Parameters:
- string $form
- Returns: mixed.
False on failure. A string on success
getRelationship()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 81
- Signature: public function getRelationship()
getRequiredForms()
Gets the forms required by the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 135
- Signature: public function getRequiredForms()
- Returns: array
of string
hasAncestor()
Determine if the form name given has ancestral conditions.
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 297
- Signature: public function hasAncestor($formName)
- Parameters:
- string $formName
- Returns: boolean
isJoin()
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 315
- Signature: public function isJoin($formName)
- Parameters:
- string $formName
- Returns: boolean
isPrimaryFormName()
Check to see if the given form name is the primary form name. Note the primary form name is the same as the relationship name
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 262
- Signature: public function isPrimaryFormName($formname)
- Parameters:
- string $formname
- Returns: boolean
isRightJoin()
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 326
- Signature: public function isRightJoin($formName)
- Parameters:
- string $formName
- Returns: boolean
joinOn_child()
Generate SQL join statement for joining on the named parent forms if with the parent of the named child form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1431
- Signature: public function joinOn_child($childFormName,$joinData)
- Parameters:
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_child_field()
Generate SQL join statement for joining on the named parent form's id with the named child form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1474
- Signature: public function joinOn_child_field($childFormName,$joinData)
- Parameters:
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_fields()
Generate SQL join statement for joining on a given field of a named child form's with the named parent form on a given field
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1593
- Signature: public function joinOn_fields($childFormName,$joinData)
- Parameters:
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_ids()
Generate SQL join statement for joining on ids of the named parent/child forms
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1381
- Signature: public function joinOn_ids($childFormName,$joinData)
- Parameters:
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_parent()
Generate SQL join statement for joining as the named child form's id with the parent of the named parent form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1181
- Signature: public function joinOn_parent($childFormName,$joinData)
- Parameters:
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_parent_field()
Generate SQL join statement for joining as a named child form's id with the named parent form on a given field @param string $childForm the name of the child form in the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1291
- Signature: public function joinOn_parent_field($childFormName,$joinData)
- Parameters:
- $childFormName
- array $joinData
The array containg the join data
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
joinOn_reference()
Generate SQL join statement for joining as a named child form's id with the named parent form on a given field @param string $childForm the name of the child form in the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1225
- Signature: public function joinOn_reference($childFormName,$joinData)
- Parameters:
- $childFormName
- array $joinData
The array containg the join data
- Returns: mixed.
On success, a string which is the SQL join statement. On failure, false
limitOne()
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 281
- Signature: public function limitOne($formName)
- Parameters:
- string $formName
- Returns: boolean
setAdditionalLimit()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 1939
- Signature: public function setAdditionalLimit($formName,$where)
- Parameters:
- $formName
- $where
useDisplayFields()
Set the relationship to use the display fields when getting form data
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 65
- Signature: public function useDisplayFields()
useRawFields()
Set the relationship to use the raw data when getting form data
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 71
- Signature: public function useRawFields()
usesRawFields()
check if the relationship to use the raw data when getting form data
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 77
- Signature: public function usesRawFields()
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()