Class: I2CE User Form (Development): Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{otherversions|Class: I2CE_User_Form}} | {{otherversions|Class: I2CE_User_Form}} | ||
This article describes the class ''I2CE_User_Form'' . | This article describes the class ''I2CE_User_Form'' . | ||
*Extends the class: [[Class: | *Extends the class: [[Class: I2CE_List (Development) | I2CE_List]]. | ||
*Location: Part of the module [[I2CE Module List (Development)#UserForm|UserForm]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Child Classes: | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | ** [[Class: I2CE_User_Request (Development) | I2CE_User_Request]] | ||
*Location: Part of the module [[I2CE Module List (Development)#UserForm|UserForm]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | |||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php#L33 modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 33 | |||
*Author: Luke Duncan <lduncan@intrahealth.org> | *Author: Luke Duncan <lduncan@intrahealth.org> | ||
*Since: v2.0.0 | *Since: v2.0.0 | ||
Line 19: | Line 21: | ||
===generate_password=== | ===generate_password=== | ||
The form field ''generate_password'' is implemented by [[Class: I2CE_FormField_YESNO (Development) |YESNO ]] | The form field ''generate_password'' is implemented by [[Class: I2CE_FormField_YESNO (Development) |YESNO ]] | ||
==Inherited Form Fields== | |||
===remap=== | |||
The form field ''remap'' is implemented by [[Class: I2CE_FormField_REMAP (Development) |REMAP ]]is inherited from the class [[Class: I2CE_List (Development)|I2CE_List]] | |||
===i2ce_hidden=== | |||
The form field ''i2ce_hidden'' is implemented by [[Class: I2CE_FormField_YESNO (Development) |YESNO ]]is inherited from the class [[Class: I2CE_List (Development)|I2CE_List]] | |||
==Variables== | ==Variables== | ||
===$user=== | ===$user=== | ||
The I2CE_User which makes up this form protected I2CE_User $user | The I2CE_User which makes up this form protected I2CE_User $user | ||
*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/UserForm/lib/I2CE_User_Form.php#L85 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 85 | ||
*Type: protected $user | *Type: protected $user | ||
===$allowedDetails=== | ===$allowedDetails=== | ||
of string the allowed details | of string the allowed details | ||
*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/UserForm/lib/I2CE_User_Form.php#L91 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 91 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $allowedDetails | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $allowedDetails | ||
Line 33: | Line 42: | ||
===__construct()=== | ===__construct()=== | ||
Create a new instance of a I2CE_User_Form object. If the username isn't given then it will be determined from the session array. | Create a new instance of a I2CE_User_Form object. If the username isn't given then it will be determined from the session array. | ||
*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/UserForm/lib/I2CE_User_Form.php#L102 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 102 | ||
*Signature: public function __construct($factory,$form,$username) | *Signature: public function __construct($factory,$form,$username) | ||
*Parameters: | *Parameters: | ||
Line 42: | Line 51: | ||
===__get()=== | ===__get()=== | ||
Magic method to access user info | Magic method to access user info | ||
*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/UserForm/lib/I2CE_User_Form.php#L171 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 171 | ||
*Signature: public function __get($detail) | *Signature: public function __get($detail) | ||
*Parameters: | *Parameters: | ||
Line 49: | Line 58: | ||
===__set()=== | ===__set()=== | ||
Magic method to set user info | Magic method to set user info | ||
*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/UserForm/lib/I2CE_User_Form.php#L202 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 202 | ||
*Signature: public function __set($detail,$value) | *Signature: public function __set($detail,$value) | ||
*Parameters: | *Parameters: | ||
Line 57: | Line 66: | ||
===__unset()=== | ===__unset()=== | ||
Magic method to set user info | Magic method to set user info | ||
*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/UserForm/lib/I2CE_User_Form.php#L237 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 237 | ||
*Signature: public function __unset($detail) | *Signature: public function __unset($detail) | ||
*Parameters: | *Parameters: | ||
Line 64: | Line 73: | ||
===changePassword()=== | ===changePassword()=== | ||
Change the password for this user. This will update a user's record to change the password in the database. It checks to make sure the new password matches the confirmation. | Change the password for this user. This will update a user's record to change the password in the database. It checks to make sure the new password matches the confirmation. | ||
*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/UserForm/lib/I2CE_User_Form.php#L298 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 298 | ||
*Signature: public function changePassword($post) | *Signature: public function changePassword($post) | ||
*Parameters: | *Parameters: | ||
Line 70: | Line 79: | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The message to display back to the user signifying success or failure. @global array | *Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The message to display back to the user signifying success or failure. @global array | ||
===displayName()=== | ===displayName()=== | ||
*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/UserForm/lib/I2CE_User_Form.php#L161 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 161 | ||
*Signature: public function displayName() | *Signature: public function displayName() | ||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The first initial and last name of this user. | *Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>The first initial and last name of this user. | ||
===getRoleNameFromShortName()=== | ===getRoleNameFromShortName()=== | ||
Get the display name associated to a role's shortname | Get the display name associated to a role's shortname | ||
*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/UserForm/lib/I2CE_User_Form.php#L69 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 69 | ||
*Signature: static public function getRoleNameFromShortName($name) | *Signature: static public function getRoleNameFromShortName($name) | ||
*Parameters: | *Parameters: | ||
Line 82: | Line 91: | ||
===getTrickleUpFromShortName()=== | ===getTrickleUpFromShortName()=== | ||
Returns the role trickle up from the shortname | Returns the role trickle up from the shortname | ||
*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/UserForm/lib/I2CE_User_Form.php#L42 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 42 | ||
*Signature: static public function getTrickleUpFromShortName($name) | *Signature: static public function getTrickleUpFromShortName($name) | ||
*Parameters: | *Parameters: | ||
Line 89: | Line 98: | ||
===populate()=== | ===populate()=== | ||
Populate the member variables of this object. This will also update the user log to show the latest activity for this login. @param boolean $update_log @global array | Populate the member variables of this object. This will also update the user log to show the latest activity for this login. @param boolean $update_log @global array | ||
*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/UserForm/lib/I2CE_User_Form.php#L266 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 266 | ||
*Signature: public function populate() | *Signature: public function populate($repopulate) | ||
*Parameters: | |||
**$repopulate | |||
***Default Value: false | |||
===save()=== | ===save()=== | ||
Saves the user to the database. This method saves all the user data and updates the access the user has for this system. @global array | Saves the user to the database. This method saves all the user data and updates the access the user has for this system. @global array | ||
*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/UserForm/lib/I2CE_User_Form.php#L395 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 395 | ||
*Signature: public function save() | *Signature: public function save($user,$transact) | ||
*Parameters: | |||
**$user | |||
**$transact | |||
***Default Value: true | |||
===setFromPost()=== | ===setFromPost()=== | ||
Load the member variables from an array The array can contain the keys 'id', 'parent', 'fields'. The later of which is an array indexed by field names and which contains the values of the field | Load the member variables from an array The array can contain the keys 'id', 'parent', 'fields'. The later of which is an array indexed by field names and which contains the values of the field | ||
*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/UserForm/lib/I2CE_User_Form.php#L320 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 320 | ||
*Signature: public function setFromPost($post,$populate_on_set_id) | *Signature: public function setFromPost($post,$populate_on_set_id) | ||
*Parameters: | *Parameters: | ||
Line 105: | Line 121: | ||
===tryGeneratePassword()=== | ===tryGeneratePassword()=== | ||
Try to generate a new password and assign it to the password and confirm variables. | Try to generate a new password and assign it to the password and confirm variables. | ||
*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/UserForm/lib/I2CE_User_Form.php#L348 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 348 | ||
*Signature: public function tryGeneratePassword() | *Signature: public function tryGeneratePassword() | ||
===validate()=== | ===validate()=== | ||
Checks to make sure all the required fields are valid. Checks to make sure the username is unique in the system and that the password matches the confirmed password. @global array | Checks to make sure all the required fields are valid. Checks to make sure the username is unique in the system and that the password matches the confirmed password. @global array | ||
*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/UserForm/lib/I2CE_User_Form.php#L374 i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php] on line 374 | ||
*Signature: public function validate() | *Signature: public function validate() | ||
==Inherited Methods== | ==Inherited Methods== | ||
===buildDataTree()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#buildDataTree() | I2CE_List->buildDataTree()]] | |||
===componentizeQuery()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#componentizeQuery() | I2CE_List->componentizeQuery()]] | |||
===findLowerMatches()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#findLowerMatches() | I2CE_List->findLowerMatches()]] | |||
===flattenDataTree()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#flattenDataTree() | I2CE_List->flattenDataTree()]] | |||
===getDisplayFieldStyles()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getDisplayFieldStyles() | I2CE_List->getDisplayFieldStyles()]] | |||
===getDisplayFields()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getDisplayFields() | I2CE_List->getDisplayFields()]] | |||
===getDisplayString()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getDisplayString() | I2CE_List->getDisplayString()]] | |||
===getFieldsMappingToList()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getFieldsMappingToList() | I2CE_List->getFieldsMappingToList()]] | |||
===getHTMLTemplate()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getHTMLTemplate() | I2CE_List->getHTMLTemplate()]] | |||
===getListType()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getListType() | I2CE_List->getListType()]] | |||
===getSortFields()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getSortFields() | I2CE_List->getSortFields()]] | |||
===getViewTemplate()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#getViewTemplate() | I2CE_List->getViewTemplate()]] | |||
===isList()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#isList() | I2CE_List->isList()]] | |||
===listOptions()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#listOptions() | I2CE_List->listOptions()]] | |||
===lookup()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#lookup() | I2CE_List->lookup()]] | |||
===name()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#name() | I2CE_List->name()]] | |||
===setDisplayData()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#setDisplayData() | I2CE_List->setDisplayData()]] | |||
===showHiddenLimit()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#showHiddenLimit() | I2CE_List->showHiddenLimit()]] | |||
===walkupFieldPath()=== | |||
This public method is inherited from [[Class: I2CE_List (Development)#walkupFieldPath() | I2CE_List->walkupFieldPath()]] | |||
===_findLowerMatches()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#_findLowerMatches() | I2CE_List->_findLowerMatches()]] | |||
===_getDisplayFields()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#_getDisplayFields() | I2CE_List->_getDisplayFields()]] | |||
===_getDisplayString()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#_getDisplayString() | I2CE_List->_getDisplayString()]] | |||
===_getSortFields()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#_getSortFields() | I2CE_List->_getSortFields()]] | |||
===_searchLowerMatches()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#_searchLowerMatches() | I2CE_List->_searchLowerMatches()]] | |||
===addCache()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#addCache() | I2CE_List->addCache()]] | |||
===getCache()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#getCache() | I2CE_List->getCache()]] | |||
===isCached()=== | |||
This protected method is inherited from [[Class: I2CE_List (Development)#isCached() | I2CE_List->isCached()]] | |||
===addChildForm()=== | ===addChildForm()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#addChildForm() | I2CE_Form->addChildForm()]] | This public method is inherited from [[Class: I2CE_Form (Development)#addChildForm() | I2CE_Form->addChildForm()]] | ||
===childFormAdded()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#childFormAdded() | I2CE_Form->childFormAdded()]] | |||
===cleanup()=== | ===cleanup()=== | ||
Line 141: | Line 241: | ||
===getField()=== | ===getField()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#getField() | I2CE_Form->getField()]] | This public method is inherited from [[Class: I2CE_Form (Development)#getField() | I2CE_Form->getField()]] | ||
===getFormID()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#getFormID() | I2CE_Form->getFormID()]] | |||
===getHistory()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#getHistory() | I2CE_Form->getHistory()]] | |||
===getParent()=== | ===getParent()=== | ||
Line 156: | Line 262: | ||
===listFields()=== | ===listFields()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#listFields() | I2CE_Form->listFields()]] | This public method is inherited from [[Class: I2CE_Form (Development)#listFields() | I2CE_Form->listFields()]] | ||
===parentIsSet()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#parentIsSet() | I2CE_Form->parentIsSet()]] | |||
===processDOM()=== | ===processDOM()=== | ||
Line 165: | Line 274: | ||
===search()=== | ===search()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#search() | I2CE_Form->search()]] | This public method is inherited from [[Class: I2CE_Form (Development)#search() | I2CE_Form->search()]] | ||
===setCreated()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#setCreated() | I2CE_Form->setCreated()]] | |||
===setDisplayName()=== | ===setDisplayName()=== | ||
Line 171: | Line 283: | ||
===setForm()=== | ===setForm()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#setForm() | I2CE_Form->setForm()]] | This public method is inherited from [[Class: I2CE_Form (Development)#setForm() | I2CE_Form->setForm()]] | ||
===setLastModified()=== | |||
This public method is inherited from [[Class: I2CE_Form (Development)#setLastModified() | I2CE_Form->setLastModified()]] | |||
===setParent()=== | ===setParent()=== | ||
This public method is inherited from [[Class: I2CE_Form (Development)#setParent() | I2CE_Form->setParent()]] | This public method is inherited from [[Class: I2CE_Form (Development)#setParent() | I2CE_Form->setParent()]] | ||
===isValidFieldName()=== | |||
This protected method is inherited from [[Class: I2CE_Form (Development)#isValidFieldName() | I2CE_Form->isValidFieldName()]] | |||
===lookupArray()=== | ===lookupArray()=== | ||
This protected method is inherited from [[Class: I2CE_Form (Development)#lookupArray() | I2CE_Form->lookupArray()]] | This protected method is inherited from [[Class: I2CE_Form (Development)#lookupArray() | I2CE_Form->lookupArray()]] | ||
===preProcessFieldArgs()=== | |||
This protected method is inherited from [[Class: I2CE_Form (Development)#preProcessFieldArgs() | I2CE_Form->preProcessFieldArgs()]] | |||
===setupCreatedField()=== | |||
This protected method is inherited from [[Class: I2CE_Form (Development)#setupCreatedField() | I2CE_Form->setupCreatedField()]] | |||
===setupLastModifiedField()=== | |||
This protected method is inherited from [[Class: I2CE_Form (Development)#setupLastModifiedField() | I2CE_Form->setupLastModifiedField()]] | |||
===setupParentField()=== | |||
This protected method is inherited from [[Class: I2CE_Form (Development)#setupParentField() | I2CE_Form->setupParentField()]] | |||
===__isset()=== | ===__isset()=== | ||
Line 192: | Line 322: | ||
===getAttribute()=== | ===getAttribute()=== | ||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getAttribute() | I2CE_FieldContainer->getAttribute()]] | This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getAttribute() | I2CE_FieldContainer->getAttribute()]] | ||
===getContainerIndex()=== | |||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#getContainerIndex() | I2CE_FieldContainer->getContainerIndex()]] | |||
===getContainerType()=== | ===getContainerType()=== | ||
Line 228: | Line 361: | ||
===hasAttribute()=== | ===hasAttribute()=== | ||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasAttribute() | I2CE_FieldContainer->hasAttribute()]] | This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasAttribute() | I2CE_FieldContainer->hasAttribute()]] | ||
===hasField()=== | |||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#hasField() | I2CE_FieldContainer->hasField()]] | |||
===hasInvalid()=== | ===hasInvalid()=== | ||
Line 258: | Line 394: | ||
===setId()=== | ===setId()=== | ||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setId() | I2CE_FieldContainer->setId()]] | This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setId() | I2CE_FieldContainer->setId()]] | ||
===setInvalidMessage()=== | |||
This public method is inherited from [[Class: I2CE_FieldContainer (Development)#setInvalidMessage() | I2CE_FieldContainer->setInvalidMessage()]] | |||
===setMeta()=== | ===setMeta()=== | ||
Line 277: | Line 416: | ||
This public method is inherited from [[Class: I2CE_Fuzzy (Development)#_hasMethod() | I2CE_Fuzzy->_hasMethod()]] | This public method is inherited from [[Class: I2CE_Fuzzy (Development)#_hasMethod() | I2CE_Fuzzy->_hasMethod()]] | ||
==Inherited Variables== | ==Inherited Variables== | ||
===$mapped_fields_by_form=== | |||
Theis protected variable is inherited from [[Class: I2CE_List (Development)#$mapped_fields_by_form | I2CE_List->$mapped_fields_by_form]] | |||
===$cache=== | |||
Theis protected variable is inherited from [[Class: I2CE_List (Development)#$cache | I2CE_List->$cache]] | |||
===$children=== | ===$children=== | ||
Theis public variable is inherited from [[Class: I2CE_Form (Development)#$children | I2CE_Form->$children]] | Theis public variable is inherited from [[Class: I2CE_Form (Development)#$children | I2CE_Form->$children]] | ||
===$parent_forms=== | ===$parent_forms=== | ||
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parent_forms | I2CE_Form->$parent_forms]] | Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parent_forms | I2CE_Form->$parent_forms]] | ||
===$parentField=== | |||
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$parentField | I2CE_Form->$parentField]] | |||
===$lastModifiedField=== | |||
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$lastModifiedField | I2CE_Form->$lastModifiedField]] | |||
===$createdField=== | |||
Theis protected variable is inherited from [[Class: I2CE_Form (Development)#$createdField | I2CE_Form->$createdField]] | |||
===$name=== | ===$name=== | ||
Line 342: | Line 493: | ||
===isWritable()=== | ===isWritable()=== | ||
This method is inherited from [[Class: I2CE_Form (Development)#isWritable() | I2CE_Form->isWritable()]] | This method is inherited from [[Class: I2CE_Form (Development)#isWritable() | I2CE_Form->isWritable()]] | ||
===duplicate()=== | |||
This method is inherited from [[Class: I2CE_Form (Development)#duplicate() | I2CE_Form->duplicate()]] | |||
===storeHistory()=== | |||
This method is inherited from [[Class: I2CE_Form (Development)#storeHistory() | I2CE_Form->storeHistory()]] | |||
===populateChild()=== | ===populateChild()=== | ||
Line 363: | Line 520: | ||
===setChangeType()=== | ===setChangeType()=== | ||
This method is inherited from [[Class: I2CE_Form (Development)#setChangeType() | I2CE_Form->setChangeType()]] | This method is inherited from [[Class: I2CE_Form (Development)#setChangeType() | I2CE_Form->setChangeType()]] | ||
===changeID()=== | |||
This method is inherited from [[Class: I2CE_Form (Development)#changeID() | I2CE_Form->changeID()]] | |||
===userMessage()=== | ===userMessage()=== |
Latest revision as of 08:20, 6 May 2015
This article describes the class I2CE_User_Form .
- Extends the class: I2CE_List.
- Child Classes:
- Location: Part of the module UserForm in the package I2CE 4.1-dev
- Source: Defined in the file modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 33
- Author: Luke Duncan <lduncan@intrahealth.org>
- Since: v2.0.0
Object for dealing with system users. This class uses the interface to handle editing of users from within the system as well as handles role access for pages.
Form Fields
This class is a form class and provides the following form fields
username
The form field username is implemented by STRING_LINE
password
The form field password is implemented by STRING_PASS
confirm
The form field confirm is implemented by STRING_PASS
role
The form field role is implemented by MAP
generate_password
The form field generate_password is implemented by YESNO
Inherited Form Fields
remap
The form field remap is implemented by REMAP is inherited from the class I2CE_List
The form field i2ce_hidden is implemented by YESNO is inherited from the class I2CE_List
Variables
$user
The I2CE_User which makes up this form protected I2CE_User $user
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 85
- Type: protected $user
$allowedDetails
of string the allowed details
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 91
- Type: protected array $allowedDetails
Methods
__construct()
Create a new instance of a I2CE_User_Form object. If the username isn't given then it will be determined from the session array.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 102
- Signature: public function __construct($factory,$form,$username)
- Parameters:
- I2CE_FieldContainer_Factory $factory
- string $form
The name of this form. Should be 'user'. - string $username
- Default Value: '0'
__get()
Magic method to access user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 171
- Signature: public function __get($detail)
- Parameters:
- string $detail
- Returns: string
__set()
Magic method to set user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 202
- Signature: public function __set($detail,$value)
- Parameters:
- string $detail
- $value
- Returns: string
__unset()
Magic method to set user info
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 237
- Signature: public function __unset($detail)
- Parameters:
- $detail
- Returns: string
changePassword()
Change the password for this user. This will update a user's record to change the password in the database. It checks to make sure the new password matches the confirmation.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 298
- Signature: public function changePassword($post)
- Parameters:
- array $post
- Returns: string
The message to display back to the user signifying success or failure. @global array
displayName()
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 161
- Signature: public function displayName()
- Returns: string
The first initial and last name of this user.
getRoleNameFromShortName()
Get the display name associated to a role's shortname
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 69
- Signature: static public function getRoleNameFromShortName($name)
- Parameters:
- string $name
the shortname of the role
- string $name
- Returns: string
getTrickleUpFromShortName()
Returns the role trickle up from the shortname
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 42
- Signature: static public function getTrickleUpFromShortName($name)
- Parameters:
- string $name
the role shortname
- string $name
- Returns: array
(an empty array if there is no such tag name)
populate()
Populate the member variables of this object. This will also update the user log to show the latest activity for this login. @param boolean $update_log @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 266
- Signature: public function populate($repopulate)
- Parameters:
- $repopulate
- Default Value: false
- $repopulate
save()
Saves the user to the database. This method saves all the user data and updates the access the user has for this system. @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 395
- Signature: public function save($user,$transact)
- Parameters:
- $user
- $transact
- Default Value: true
setFromPost()
Load the member variables from an array The array can contain the keys 'id', 'parent', 'fields'. The later of which is an array indexed by field names and which contains the values of the field
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 320
- Signature: public function setFromPost($post,$populate_on_set_id)
- Parameters:
- array $post
The post object is passed as a reference - $populate_on_set_id
- Default Value: false
- array $post
tryGeneratePassword()
Try to generate a new password and assign it to the password and confirm variables.
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 348
- Signature: public function tryGeneratePassword()
validate()
Checks to make sure all the required fields are valid. Checks to make sure the username is unique in the system and that the password matches the confirmed password. @global array
- Defined in i2ce/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php on line 374
- Signature: public function validate()
Inherited Methods
buildDataTree()
This public method is inherited from I2CE_List->buildDataTree()
componentizeQuery()
This public method is inherited from I2CE_List->componentizeQuery()
findLowerMatches()
This public method is inherited from I2CE_List->findLowerMatches()
flattenDataTree()
This public method is inherited from I2CE_List->flattenDataTree()
getDisplayFieldStyles()
This public method is inherited from I2CE_List->getDisplayFieldStyles()
getDisplayFields()
This public method is inherited from I2CE_List->getDisplayFields()
getDisplayString()
This public method is inherited from I2CE_List->getDisplayString()
getFieldsMappingToList()
This public method is inherited from I2CE_List->getFieldsMappingToList()
getHTMLTemplate()
This public method is inherited from I2CE_List->getHTMLTemplate()
getListType()
This public method is inherited from I2CE_List->getListType()
getSortFields()
This public method is inherited from I2CE_List->getSortFields()
getViewTemplate()
This public method is inherited from I2CE_List->getViewTemplate()
isList()
This public method is inherited from I2CE_List->isList()
listOptions()
This public method is inherited from I2CE_List->listOptions()
lookup()
This public method is inherited from I2CE_List->lookup()
name()
This public method is inherited from I2CE_List->name()
setDisplayData()
This public method is inherited from I2CE_List->setDisplayData()
showHiddenLimit()
This public method is inherited from I2CE_List->showHiddenLimit()
walkupFieldPath()
This public method is inherited from I2CE_List->walkupFieldPath()
_findLowerMatches()
This protected method is inherited from I2CE_List->_findLowerMatches()
_getDisplayFields()
This protected method is inherited from I2CE_List->_getDisplayFields()
_getDisplayString()
This protected method is inherited from I2CE_List->_getDisplayString()
_getSortFields()
This protected method is inherited from I2CE_List->_getSortFields()
_searchLowerMatches()
This protected method is inherited from I2CE_List->_searchLowerMatches()
addCache()
This protected method is inherited from I2CE_List->addCache()
getCache()
This protected method is inherited from I2CE_List->getCache()
isCached()
This protected method is inherited from I2CE_List->isCached()
addChildForm()
This public method is inherited from I2CE_Form->addChildForm()
childFormAdded()
This public method is inherited from I2CE_Form->childFormAdded()
cleanup()
This public method is inherited from I2CE_Form->cleanup()
displayField()
This public method is inherited from I2CE_Form->displayField()
form()
This public method is inherited from I2CE_Form->form()
getAllowedParentForms()
This public method is inherited from I2CE_Form->getAllowedParentForms()
getChildForms()
This public method is inherited from I2CE_Form->getChildForms()
getChildFormsByForm()
This public method is inherited from I2CE_Form->getChildFormsByForm()
getChildren()
This public method is inherited from I2CE_Form->getChildren()
getDisplayName()
This public method is inherited from I2CE_Form->getDisplayName()
getField()
This public method is inherited from I2CE_Form->getField()
getFormID()
This public method is inherited from I2CE_Form->getFormID()
getHistory()
This public method is inherited from I2CE_Form->getHistory()
getParent()
This public method is inherited from I2CE_Form->getParent()
getParentForm()
This public method is inherited from I2CE_Form->getParentForm()
getParentID()
This public method is inherited from I2CE_Form->getParentID()
getPost()
This public method is inherited from I2CE_Form->getPost()
listFields()
This public method is inherited from I2CE_Form->listFields()
parentIsSet()
This public method is inherited from I2CE_Form->parentIsSet()
processDOM()
This public method is inherited from I2CE_Form->processDOM()
reset()
This public method is inherited from I2CE_Form->reset()
search()
This public method is inherited from I2CE_Form->search()
setCreated()
This public method is inherited from I2CE_Form->setCreated()
setDisplayName()
This public method is inherited from I2CE_Form->setDisplayName()
setForm()
This public method is inherited from I2CE_Form->setForm()
setLastModified()
This public method is inherited from I2CE_Form->setLastModified()
setParent()
This public method is inherited from I2CE_Form->setParent()
isValidFieldName()
This protected method is inherited from I2CE_Form->isValidFieldName()
lookupArray()
This protected method is inherited from I2CE_Form->lookupArray()
preProcessFieldArgs()
This protected method is inherited from I2CE_Form->preProcessFieldArgs()
setupCreatedField()
This protected method is inherited from I2CE_Form->setupCreatedField()
setupLastModifiedField()
This protected method is inherited from I2CE_Form->setupLastModifiedField()
setupParentField()
This protected method is inherited from I2CE_Form->setupParentField()
__isset()
This public method is inherited from I2CE_FieldContainer->__isset()
addField()
This public method is inherited from I2CE_FieldContainer->addField()
clearFields()
This public method is inherited from I2CE_FieldContainer->clearFields()
current()
This public method is inherited from I2CE_FieldContainer->current()
getAttribute()
This public method is inherited from I2CE_FieldContainer->getAttribute()
getContainerIndex()
This public method is inherited from I2CE_FieldContainer->getContainerIndex()
getContainerType()
This public method is inherited from I2CE_FieldContainer->getContainerType()
getFieldNames()
This public method is inherited from I2CE_FieldContainer->getFieldNames()
getHTMLName()
This public method is inherited from I2CE_FieldContainer->getHTMLName()
getId()
This public method is inherited from I2CE_FieldContainer->getId()
getLoad()
This public method is inherited from I2CE_FieldContainer->getLoad()
getMeta()
This public method is inherited from I2CE_FieldContainer->getMeta()
getName()
This public method is inherited from I2CE_FieldContainer->getName()
getNameId()
This public method is inherited from I2CE_FieldContainer->getNameId()
getQueryDisplay()
This public method is inherited from I2CE_FieldContainer->getQueryDisplay()
getQueryFields()
This public method is inherited from I2CE_FieldContainer->getQueryFields()
getQueryString()
This public method is inherited from I2CE_FieldContainer->getQueryString()
hasAttribute()
This public method is inherited from I2CE_FieldContainer->hasAttribute()
hasField()
This public method is inherited from I2CE_FieldContainer->hasField()
hasInvalid()
This public method is inherited from I2CE_FieldContainer->hasInvalid()
hasMeta()
This public method is inherited from I2CE_FieldContainer->hasMeta()
isValid()
This public method is inherited from I2CE_FieldContainer->isValid()
key()
This public method is inherited from I2CE_FieldContainer->key()
load()
This public method is inherited from I2CE_FieldContainer->load()
next()
This public method is inherited from I2CE_FieldContainer->next()
removeField()
This public method is inherited from I2CE_FieldContainer->removeField()
rewind()
This public method is inherited from I2CE_FieldContainer->rewind()
setAttribute()
This public method is inherited from I2CE_FieldContainer->setAttribute()
setId()
This public method is inherited from I2CE_FieldContainer->setId()
setInvalidMessage()
This public method is inherited from I2CE_FieldContainer->setInvalidMessage()
setMeta()
This public method is inherited from I2CE_FieldContainer->setMeta()
setName()
This public method is inherited from I2CE_FieldContainer->setName()
valid()
This public method is inherited from I2CE_FieldContainer->valid()
addFields()
This protected method is inherited from I2CE_FieldContainer->addFields()
getAttributes()
This protected method is inherited from I2CE_FieldContainer->getAttributes()
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Variables
$mapped_fields_by_form
Theis protected variable is inherited from I2CE_List->$mapped_fields_by_form
$cache
Theis protected variable is inherited from I2CE_List->$cache
$children
Theis public variable is inherited from I2CE_Form->$children
$parent_forms
Theis protected variable is inherited from I2CE_Form->$parent_forms
$parentField
Theis protected variable is inherited from I2CE_Form->$parentField
$lastModifiedField
Theis protected variable is inherited from I2CE_Form->$lastModifiedField
$createdField
Theis protected variable is inherited from I2CE_Form->$createdField
$name
Theis protected variable is inherited from I2CE_FieldContainer->$name
$display_name
Theis protected variable is inherited from I2CE_FieldContainer->$display_name
$fields
Theis protected variable is inherited from I2CE_FieldContainer->$fields
$attributes
Theis protected variable is inherited from I2CE_FieldContainer->$attributes
$id
Theis protected variable is inherited from I2CE_FieldContainer->$id
$factory
Theis protected variable is inherited from I2CE_FieldContainer->$factory
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()
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()
duplicate()
This method is inherited from I2CE_Form->duplicate()
storeHistory()
This method is inherited from I2CE_Form->storeHistory()
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()
setChangeType()
This method is inherited from I2CE_Form->setChangeType()
changeID()
This method is inherited from I2CE_Form->changeID()
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()