Class: iHRIS Person

From IHRIS Wiki
Revision as of 13:26, 19 October 2009 by Litlfred (talk | contribs)

This article describes the class iHRIS_Person.

iHRIS_Person

Form Fields

This class is a form class and provides the following form fields

surname

The form field surname is implemented by STRING_LINE

firstname

The form field firstname is implemented by STRING_LINE

othername

The form field othername is implemented by STRING_LINE

nationality

The form field nationality is implemented by MAP

surname_ignore

The form field surname_ignore is implemented by BOOL

residence

The form field residence is implemented by MAP

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. @param I2CE_Template $page A reference to the top level Template object

  • Signature: public function validate()

Fuzzy Methods

getLastPosition()

This method is implemented by iHRIS_Module_PersonPosition->getLastPosition()

isActive()

This method is implemented by iHRIS_Module_PersonPosition->isActive_Person()