Class: iHRIS Person: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 9: Line 9:
Create a new instance of a person.
Create a new instance of a person.
*Signature: public function __construct($form,$id)
*Signature: public function __construct($form,$id)
Parameters:
*Parameters:
* [http://www.php.net/manual/en/language.types.string.php string ] $form<br/>The name of this form
** [http://www.php.net/manual/en/language.types.string.php string ] $form <br/>The name of this form
* integer $id
** integer $id
**Default Value: 0  
***Default Value: 0  
===search()===
===search()===
Search the database for a person record.
Search the database for a person record. Returns a list of records that match the given search parameters. The $search parameter is an array in the following format: array( '<form>' => array( 0 => array( 'field' => '<field_name>', 'values' => array( 0 => array( 'value' => '<field_value>', 'method' => '=', 'lower' => <boolean> ) ), - or - 'values' => 'norecord', 'value_andor' => 'OR', 'history' => <false|true> ) $andor can be an array.  If it is, the first entry is the default value used.  The 1st entry goes between the 1st two where clauses, etc. Any forms not matching person will use the parent id from the record entry for the matching results.
 
Returns a list of records that match the given search parameters.
The $search parameter is an array in the following format:
array(
'<form>' => array(
0 => array( 'field' => '<field_name>',
'values' => array( 0 => array( 'value' => '<field_value>', 'method' => '=', 'lower' => <boolean> ) ),
- or -
'values' => 'norecord',
'value_andor' => 'OR',
'history' => <false|true>
)
 
$andor can be an array.  If it is, the first entry is the default value used.  The 1st entry goes between the 1st two where clauses, etc.
 
Any forms not matching person will use the parent id from the record entry for the matching results.
and return 100 rows.
*Signature: static public function search($search,$andor,$modified,$limit)
*Signature: static public function search($search,$andor,$modified,$limit)
*Parameters:
** [http://www.php.net/manual/en/language.types.array.php array ] $search
** [http://www.php.net/manual/en/language.types.string.php string ] $andor <br/>If the search results should be AND or OR among all the search criteria
***Default Value: "AND"
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $modified
***Default Value: false
** [http://www.php.net/manual/en/language.types.array.php array ] $limit <br/>The limit to use on the final query, ie: array( 0, 100 ) to start at the beginning and return 100 rows.
***Default Value: null
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
*Returns: [http://www.php.net/manual/en/language.types.array.php array ]
Parameters:
* [http://www.php.net/manual/en/language.types.array.php array ] $search
* [http://www.php.net/manual/en/language.types.string.php string ] $andor<br/>If the search results should be AND or OR among all the search criteria
**Default Value: "AND"
* [http://www.php.net/manual/en/language.types.boolean.php boolean ] $modified
**Default Value: false
* [http://www.php.net/manual/en/language.types.array.php array ] $limit<br/>The limit to use on the final query, ie: array( 0, 100 ) to start at the beginning
**Default Value: null
===validate()===
===validate()===
Perform additional validation for the Person object.
Perform additional validation for the Person object. A new person record needs to verify there aren't any existing records with the same name.
 
A new person record needs to verify there aren't any existing records with the same name.
*Signature: public function validate($page)
*Signature: public function validate($page)
Parameters:
*Parameters:
* [[Class: I2CE_Template | I2CE_Template]] $page<br/>A reference to the top level Template object
** [[Class: I2CE_Template | I2CE_Template]] $page <br/>A reference to the top level Template object
==Inherited Variables==
==Inherited Variables==
===$children===
===$children===

Revision as of 23:40, 16 October 2009

This article desrcibes the class iHRIS_Person.

iHRIS_Person

Methods

__construct()

Create a new instance of a person.

  • Signature: public function __construct($form,$id)
  • Parameters:
    • string $form
      The name of this form
    • integer $id
      • Default Value: 0

search()

Search the database for a person record. Returns a list of records that match the given search parameters. The $search parameter is an array in the following format: array( '<form>' => array( 0 => array( 'field' => '<field_name>', 'values' => array( 0 => array( 'value' => '<field_value>', 'method' => '=', 'lower' => <boolean> ) ), - or - 'values' => 'norecord', 'value_andor' => 'OR', 'history' => <false|true> ) $andor can be an array. If it is, the first entry is the default value used. The 1st entry goes between the 1st two where clauses, etc. Any forms not matching person will use the parent id from the record entry for the matching results.

  • Signature: static public function search($search,$andor,$modified,$limit)
  • Parameters:
    • array $search
    • string $andor
      If the search results should be AND or OR among all the search criteria
      • Default Value: "AND"
    • boolean $modified
      • Default Value: false
    • array $limit
      The limit to use on the final query, ie: array( 0, 100 ) to start at the beginning and return 100 rows.
      • Default Value: null
  • Returns: array

validate()

Perform additional validation for the Person object. A new person record needs to verify there aren't any existing records with the same name.

  • Signature: public function validate($page)
  • Parameters:

Inherited Variables

$children

Theis public variable is inherited from I2CE_Form->$children

$fields

Theis protected variable is inherited from I2CE_Form->$fields

$parent

Theis protected variable is inherited from I2CE_Form->$parent

$id

Theis protected variable is inherited from I2CE_Form->$id

$attributes

Theis protected variable is inherited from I2CE_Form->$attributes

$parent_forms

Theis protected variable is inherited from I2CE_Form->$parent_forms

Inherited Fuzzy Methods

isNumeric()

This method is inherited from I2CE_Form->isNumeric()

getLimitStyles()

This method is inherited from I2CE_Form->getLimitStyles()

checkLimit()

This method is inherited from I2CE_Form->checkLimit()

checkWhereClause()

This method is inherited from I2CE_Form->checkWhereClause()

createCheckFunction()

This method is inherited from I2CE_Form->createCheckFunction()

createCheckLimitString()

This method is inherited from I2CE_Form->createCheckLimitString()

generateLimit()

This method is inherited from I2CE_Form->generateLimit()

generateWhereClause()

This method is inherited from I2CE_Form->generateWhereClause()

processLimit()

This method is inherited from I2CE_Form->processLimit()

getDisplayedExistingLimit()

This method is inherited from I2CE_Form->getDisplayedExistingLimit()

isComponentized()

This method is inherited from I2CE_Form->isComponentized()

addChild()

This method is inherited from I2CE_Form->addChild()

getChildIds()

This method is inherited from I2CE_Form->getChildIds()

getStorage()

This method is inherited from I2CE_Form->getStorage()

isWritable()

This method is inherited from I2CE_Form->isWritable()

populate()

This method is inherited from I2CE_Form->populate()

populateChild()

This method is inherited from I2CE_Form->populateChild()

populateChildren()

This method is inherited from I2CE_Form->populateChildren()

populateFirst()

This method is inherited from I2CE_Form->populateFirst()

populateHistory()

This method is inherited from I2CE_Form->populateHistory()

populateLast()

This method is inherited from I2CE_Form->populateLast()

delete()

This method is inherited from I2CE_Form->delete()

save()

This method is inherited from I2CE_Form->save()

setChangeType()

This method is inherited from I2CE_Form->setChangeType()

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()

Fuzzy Methods

getLastPosition()

This method is implemented by iHRIS_Module_PersonPosition->getLastPosition()

isActive()

This method is implemented by iHRIS_Module_PersonPosition->isActive_Person()