Class: I2CE FormRelationship (Development): Difference between revisions
No edit summary |
No edit summary |
||
Line 37: | Line 37: | ||
===$operands=== | ===$operands=== | ||
array $operands of string. The SQL operands recognzied | array $operands of string. The SQL operands recognzied | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L566 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 566 | ||
*Type: static protected static $operands | *Type: static protected static $operands | ||
Line 52: | Line 52: | ||
===_getLimitingFields()=== | ===_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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L591 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 591 | ||
*Signature: protected function _getLimitingFields($whereConfig,$limiting_fields) | *Signature: protected function _getLimitingFields($whereConfig,$limiting_fields) | ||
*Parameters: | *Parameters: | ||
Line 58: | Line 58: | ||
**&$limiting_fields | **&$limiting_fields | ||
===addParentIdToWhereClause()=== | ===addParentIdToWhereClause()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L429 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 429 | ||
*Signature: protected function addParentIdToWhereClause($where,$parent_id) | *Signature: protected function addParentIdToWhereClause($where,$parent_id) | ||
*Parameters: | *Parameters: | ||
Line 65: | Line 65: | ||
===dropEmpty()=== | ===dropEmpty()=== | ||
Determine if we should consider a relationship to not be satisifed if there is no form for the given named form | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L236 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 236 | ||
*Signature: public function dropEmpty($formName) | *Signature: public function dropEmpty($formName) | ||
*Parameters: | *Parameters: | ||
Line 72: | Line 72: | ||
===evaluateFunction()=== | ===evaluateFunction()=== | ||
Evaluate a given relationship function on the given form data @param string $funciton | Evaluate a given relationship function on the given form data @param string $funciton | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L506 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 506 | ||
*Signature: public function evaluateFunction($function,$formData,$displayValue) | *Signature: public function evaluateFunction($function,$formData,$displayValue) | ||
*Parameters: | *Parameters: | ||
Line 82: | Line 82: | ||
===generateWhereClause()=== | ===generateWhereClause()=== | ||
Generate the where clause for the join of a given named form | Generate the where clause for the join of a given named form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L623 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 623 | ||
*Signature: public function generateWhereClause($formName) | *Signature: public function generateWhereClause($formName) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $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 | *Returns: mixed.<br/>false on failure or a SQL string on success | ||
===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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L809 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 809 | |||
*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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L842 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 842 | |||
*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 | |||
**$depth | |||
***Default Value: 1 | |||
*Returns: [http://www.php.net/manual/en/language.types.array.php array ] | |||
===getForm()=== | ===getForm()=== | ||
Returns the form for a given named form in the relationship | Returns the form for a given named form in the relationship | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L76 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 76 | ||
*Signature: public function getForm($formname) | *Signature: public function getForm($formname) | ||
*Parameters: | *Parameters: | ||
Line 96: | Line 112: | ||
===getFormConfig()=== | ===getFormConfig()=== | ||
Get the magic data node(s) for the name form in the relationship @param string $form. | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L168 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 168 | ||
*Signature: public function getFormConfig($formname) | *Signature: public function getFormConfig($formname) | ||
*Parameters: | *Parameters: | ||
Line 104: | Line 120: | ||
===getFormIdsJoiningOn()=== | ===getFormIdsJoiningOn()=== | ||
Find all form ids matching the given join | Find all form ids matching the given join | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-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 getFormIdsJoiningOn($formName,$parentFormObj | *Signature: public function getFormIdsJoiningOn($formName,$parentFormObj) | ||
*Parameters: | *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 ] $formName <br/>The named form | ||
** [[Class: I2CE_Form (Development) | I2CE_Form]] $parentFormObj <br/>The | ** [[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 | *Returns: [http://www.php.net/manual/en/language.types.array.php array ]<br/>of string, the form ids | ||
===getFormIdsJoiningOn_child()=== | ===getFormIdsJoiningOn_child()=== | ||
Get the forms ids for joining on the named parent forms if with the parent of the named child form | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1156 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1156 | ||
*Signature: public function getFormIdsJoiningOn_child($ | *Signature: public function getFormIdsJoiningOn_child($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 124: | Line 138: | ||
*Returns: mixed.<br/>An array of form ids | *Returns: mixed.<br/>An array of form ids | ||
===getFormIdsJoiningOn_child_field()=== | ===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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1243 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1243 | ||
*Signature: public function getFormIdsJoiningOn_child_field($ | *Signature: public function getFormIdsJoiningOn_child_field($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 135: | Line 149: | ||
*Returns: mixed.<br/>An array of form ids | *Returns: mixed.<br/>An array of form ids | ||
===getFormIdsJoiningOn_fields()=== | ===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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1318 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1318 | ||
*Signature: public function getFormIdsJoiningOn_fields($ | *Signature: public function getFormIdsJoiningOn_fields($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 146: | Line 160: | ||
*Returns: mixed.<br/>An array of form ids | *Returns: mixed.<br/>An array of form ids | ||
===getFormIdsJoiningOn_ids()=== | ===getFormIdsJoiningOn_ids()=== | ||
Get the forms ids for joining on ids of the named parent/child forms | Get the forms ids for joining on ids of the named parent/child forms | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1106 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1106 | ||
*Signature: public function getFormIdsJoiningOn_ids($ | *Signature: public function getFormIdsJoiningOn_ids($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 157: | Line 171: | ||
*Returns: mixed.<br/>An array of form ids | *Returns: mixed.<br/>An array of form ids | ||
===getFormIdsJoiningOn_parent()=== | ===getFormIdsJoiningOn_parent()=== | ||
Get the forms ids for joining as the named child form's id with the parent of the named parent form | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L981 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 981 | ||
*Signature: public function getFormIdsJoiningOn_parent($ | *Signature: public function getFormIdsJoiningOn_parent($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 168: | Line 182: | ||
*Returns: mixed.<br/>An array of form ids | *Returns: mixed.<br/>An array of form ids | ||
===getFormIdsJoiningOn_parent_field()=== | ===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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1045 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1045 | ||
*Signature: public function getFormIdsJoiningOn_parent_field($ | *Signature: public function getFormIdsJoiningOn_parent_field($childFormName,$parentFormObj,$joinData,$where,$limit) | ||
*Parameters: | *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 | ** [[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 ] $joinData <br/>The array containg the join data | ||
Line 180: | Line 194: | ||
===getFormNames()=== | ===getFormNames()=== | ||
Get the names of the forms in the relationship | Get the names of the forms in the relationship | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L227 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 227 | ||
*Signature: public function getFormNames() | *Signature: public function getFormNames() | ||
*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. | ||
===getForms()=== | ===getForms()=== | ||
Internal method to walk the relationship and get all the form configs and parent form names and store them in arrays | Internal method to walk the relationship and get all the form configs and parent form names and store them in arrays | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L145 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 145 | ||
*Signature: protected function getForms($config,$formConfigs,$parentForms,$parent_form_name) | *Signature: protected function getForms($config,$formConfigs,$parentForms,$parent_form_name,$depth) | ||
*Parameters: | *Parameters: | ||
** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $config <br/>The node we are walking | ** [[Class: I2CE_MagicDataNode (Development) | I2CE_MagicDataNode]] $config <br/>The node we are walking | ||
Line 192: | Line 206: | ||
** [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.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 | ** [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()=== | ===getFormsSatisfyingRelationship()=== | ||
Get the forms that satisfy a relationship for the given primary form id | Get the forms that satisfy a relationship for the given primary form id | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L247 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 247 | ||
*Signature: public function getFormsSatisfyingRelationship($form_id) | *Signature: public function getFormsSatisfyingRelationship($form_id) | ||
*Parameters: | *Parameters: | ||
Line 201: | Line 217: | ||
===getFunctionDetails()=== | ===getFunctionDetails()=== | ||
Get the details of a relationship function | Get the details of a relationship function | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L473 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 473 | ||
*Signature: public function getFunctionDetails($function) | *Signature: public function getFunctionDetails($function) | ||
*Parameters: | *Parameters: | ||
Line 207: | Line 223: | ||
*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 | *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 | ||
===getJoin()=== | ===getJoin()=== | ||
Get the SQL join statemetn for the given form | Get the SQL join statemetn for the given form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L869 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 869 | ||
*Signature: public function getJoin($ | *Signature: public function getJoin($childFormName) | ||
*Parameters: | *Parameters: | ||
**$ | ** [http://www.php.net/manual/en/language.types.string.php string ] $childFormName <br/>the named form in the relationship | ||
*Returns: mixed.<br/>String, the SQL join statements on succes, false on failure | *Returns: mixed.<br/>String, the SQL join statements on succes, false on failure | ||
===getJoiningFields()=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1367 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1367 | |||
*Signature: public function getJoiningFields($childFormName) | |||
*Parameters: | |||
**$childFormName | |||
===getLimitingFields()=== | ===getLimitingFields()=== | ||
Gets the names of the fields which are in a limit for a where clause of a given form | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L573 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 573 | ||
*Signature: public function getLimitingFields($formName) | *Signature: public function getLimitingFields($formName) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $formName <br/>The anmed form in the relationship | ** [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 | *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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L671 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 671 | |||
*Signature: protected function getLinkingData($formName,$fieldName,$joinFormName,$joinField,$style,$reversed) | |||
*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 | |||
*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()=== | ||
Get the name(s) of parent forms | Get the name(s) of parent forms | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L186 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 186 | ||
*Signature: public function getParentFormNames($formname) | *Signature: public function getParentFormNames($formname) | ||
*Parameters: | *Parameters: | ||
Line 230: | Line 265: | ||
===getPrimaryForm()=== | ===getPrimaryForm()=== | ||
Get the primary form | Get the primary form | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L202 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 202 | ||
*Signature: public function getPrimaryForm() | *Signature: public function getPrimaryForm() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===getPrimaryFormName()=== | ===getPrimaryFormName()=== | ||
Gets the name of the primary from (e.g. the name of the relationship) | Gets the name of the primary from (e.g. the name of the relationship) | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L210 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 210 | ||
*Signature: public function getPrimaryFormName() | *Signature: public function getPrimaryFormName() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===getReferencedForm()=== | ===getReferencedForm()=== | ||
Get the SQL name of a form via the registered callback functin | Get the SQL name of a form via the registered callback functin | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L453 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 453 | ||
*Signature: public function getReferencedForm($form) | *Signature: public function getReferencedForm($form) | ||
*Parameters: | *Parameters: | ||
Line 246: | Line 281: | ||
*Returns: mixed.<br/>False on failure. A string on success | *Returns: mixed.<br/>False on failure. A string on success | ||
===getReferenedForm()=== | ===getReferenedForm()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L651 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 651 | ||
*Signature: public function getReferenedForm($form) | *Signature: public function getReferenedForm($form) | ||
*Parameters: | *Parameters: | ||
Line 252: | Line 287: | ||
===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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L91 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 91 | ||
*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 | ||
===isPrimaryFormName()=== | ===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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L218 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 218 | ||
*Signature: public function isPrimaryFormName($formname) | *Signature: public function isPrimaryFormName($formname) | ||
*Parameters: | *Parameters: | ||
Line 264: | Line 299: | ||
===joinOn_child()=== | ===joinOn_child()=== | ||
Generate SQL join statement for joining on the named parent forms if with the parent of the named child form | Generate SQL join statement 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1137 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1137 | ||
*Signature: public function joinOn_child($ | *Signature: public function joinOn_child($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $ | ** [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.array.php array ] $joinData <br/>The array containg the join data | ** [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 | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | ||
===joinOn_child_field()=== | ===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 | Generate SQL join statement 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1180 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1180 | ||
*Signature: public function joinOn_child_field($ | *Signature: public function joinOn_child_field($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $ | ** [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.array.php array ] $joinData <br/>The array containg the join data | ** [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 | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | ||
===joinOn_fields()=== | ===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 | 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 [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1286 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1286 | ||
*Signature: public function joinOn_fields($ | *Signature: public function joinOn_fields($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $ | ** [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.array.php array ] $joinData <br/>The array containg the join data | ** [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 | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | ||
===joinOn_ids()=== | ===joinOn_ids()=== | ||
Generate SQL join statement for joining on ids of the named parent/child forms | Generate SQL join statement for joining on ids of the named parent/child forms | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L1087 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 1087 | ||
*Signature: public function joinOn_ids($ | *Signature: public function joinOn_ids($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $ | ** [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.array.php array ] $joinData <br/>The array containg the join data | ** [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 | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | ||
===joinOn_parent()=== | ===joinOn_parent()=== | ||
Generate SQL join statement for joining as the named child form's id with the parent of the named parent form | Generate SQL join statement 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php#L963 i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php] on line 963 | ||
*Signature: public function joinOn_parent($ | *Signature: public function joinOn_parent($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $ | ** [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.array.php array ] $joinData <br/>The array containg the join data | ** [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 | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | ||
===joinOn_parent_field()=== | ===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 | 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.0-dev/annotate/head:/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php# | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-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 joinOn_parent_field($ | *Signature: public function joinOn_parent_field($childFormName,$joinData) | ||
*Parameters: | *Parameters: | ||
** | **$childFormName | ||
** [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 ] $joinData <br/>The array containg the join data | ||
*Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false | *Returns: mixed.<br/>On success, a string which is the SQL join statement. On failure, false |
Revision as of 07:56, 3 August 2010
This article describes the class I2CE_FormRelationship .
- Extends the class: I2CE_Fuzzy.
- Location: Part of the module formRelationships in the package I2CE 4.0-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
$operands
array $operands of string. The SQL operands recognzied
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 566
- Type: static protected static $operands
Methods
__construct()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 46
- Signature: public function __construct($relationship,$relationship_base,$form_reference)
- Parameters:
_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 591
- Signature: protected function _getLimitingFields($whereConfig,$limiting_fields)
- Parameters:
- I2CE_MagicDataNode $whereConfig
- &$limiting_fields
addParentIdToWhereClause()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 429
- Signature: protected function addParentIdToWhereClause($where,$parent_id)
- Parameters:
- &$where
- $parent_id
dropEmpty()
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 236
- Signature: public function dropEmpty($formName)
- Parameters:
- string $formName
- Returns: boolean
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 506
- Signature: public function evaluateFunction($function,$formData,$displayValue)
- Parameters:
- Returns: string
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 623
- Signature: public function generateWhereClause($formName)
- Parameters:
- string $formName
- Returns: mixed.
false on failure or a SQL string on success
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 809
- 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 842
- Signature: public function getChildFormNames($formName,$depth)
- Parameters:
- string $formName @var int $depth. Defaults to 1 in which case we only get the immediate children
- $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 76
- 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 168
- 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.
getFormIdsJoiningOn()
Find all form ids matching the given join
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 326
- 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 1156
- 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 1243
- 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 1318
- 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 1106
- 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 981
- 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 1045
- Signature: public function getFormIdsJoiningOn_parent_field($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 227
- 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 145
- 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 247
- Signature: public function getFormsSatisfyingRelationship($form_id)
- Parameters:
- mixed $form_id
Either 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 473
- Signature: public function getFunctionDetails($function)
- Parameters:
- string $function
- 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
getJoin()
Get the SQL join statemetn for the given form
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 869
- Signature: public function getJoin($childFormName)
- Parameters:
- string $childFormName
the named form in the relationship
- 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 1367
- 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 573
- 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 671
- Signature: protected function getLinkingData($formName,$fieldName,$joinFormName,$joinField,$style,$reversed)
- 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 186
- 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 202
- 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 210
- 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 453
- Signature: public function getReferencedForm($form)
- Parameters:
- string $form
- Returns: mixed.
False on failure. A string on success
getReferenedForm()
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 651
- Signature: public function getReferenedForm($form)
- Parameters:
- $form
getRequiredForms()
Gets the forms required by the relationship
- Defined in i2ce/modules/Forms/modules/FormRelationship/lib/I2CE_FormRelationship.php on line 91
- Signature: public function getRequiredForms()
- Returns: array
of string
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 218
- Signature: public function isPrimaryFormName($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 1137
- 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 1180
- 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 1286
- 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 1087
- 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 963
- 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 1011
- 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
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()