Class: iHRIS Person
This article describes the class iHRIS_Person.
- Extends the class: I2CE_Form.
- Child Classes:
- Location: Part of the module Person in the package iHRIS Common
- Source: Defined in the file modules/Person/lib/iHRIS_Person.php
- Author: Carl Leitner <litlfred@ibiblio.org>
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
- string $form
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:
- 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()