Class: I2CE FieldContainer (Development)
This article describes the abstract class I2CE_FieldContainer .
- Extends the class: I2CE_Fuzzy.
- Implements the interface Iterator
- Child Classes:
- I2CE_Form
- I2CE_List
- iHRIS_Contact
- iHRIS_Country
- I2CE_SimpleList
- iHRIS_Position
- iHRIS_Cadre
- iHRIS_Competency
- iHRIS_Scheduled_Training_Course
- iHRIS_Training_Course
- iHRIS_ContinuingEducationCourse
- iHRIS_Currency
- iHRIS_ListByCountry
- iHRIS_County
- iHRIS_District
- iHRIS_Region
- I2CE_Form_Locale
- iHRIS_Degree
- I2CE_ArchivedReport
- I2CE_Role
- iHRIS_EstablishmentPeriod
- iHRIS_Establishment
- iHRIS_Classification
- iHRIS_SalaryGrade
- iHRIS_Job
- iHRIS_Department
- iHRIS_Certificate
- iHRIS_DisciplinaryActionReason
- iHRIS_TrainingDisruptionReason
- iHRIS_TrainingProgram
- iHRIS_ISCO_08_Major
- iHRIS_ISCO_08_Sub_Major
- iHRIS_ISCO_88_Major
- iHRIS_ISCO_88_Sub_Major
- iHRIS_ISCO_88_Minor
- iHRIS_ISCO_88_Unit
- iHRIS_Training_Course_Evaluation
- iHRIS_Person
- iHRIS_UUID_Map
- I2CE_User_Form
- iHRIS_Applicant
- iHRIS_Benefit
- iHRIS_PersonPosition
- iHRIS_DisciplinaryAction
- iHRIS_Exam
- iHRIS_License
- iHRIS_PrivatePractice
- iHRIS_Registration
- iHRIS_Training
- iHRIS_TrainingDisrupt
- iHRIS_ContinuingEducation
- iHRIS_Document
- I2CE_ListLink
- iHRIS_Demographic
- iHRIS_Education
- iHRIS_Employment
- iHRIS_PersonID
- iHRIS_PersonLanguage
- iHRIS_Notes
- iHRIS_Photo
- I2CE_GeneratedDoc
- iHRIS_RecordVerify
- iHRIS_Accident
- iHRIS_Dependent
- iHRIS_PositionInterview
- iHRIS_PositionDecision
- iHRIS_Salary
- iHRIS_Deployment
- iHRIS_SecondaryEducation
- iHRIS_FacilityInstitution
- iHRIS_FacilityInstitutionEditFacility
- iHRIS_FacilityInstitutionEditInstitution
- iHRIS_InstitutionInspection
- iHRIS_OutMigration
- iHRIS_PersonCompetency
- iHRIS_Person_Scheduled_Training_Course
- iHRIS_Training_Course_Competency_Evaluation
- I2CE_List
- I2CE_Form
- Location: Part of the module Fields in the package I2CE 4.0-dev
- Source: Defined in the file modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 33
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v4.0.6
@filesource Class I2CE_FieldContainer
Variables
$name
The name of this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 39
- Type: protected string $name
$display_name
The text name of this field container for display.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 44
- Type: protected string $display_name
$fields
The list of fields with all the information about each field.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 49
- Type: protected array $fields
$attributes
A list of attributes for this field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 55
- Type: protected array $attributes
$id
The record id for this entry.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 60
- Type: protected mixed $id
$factory
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 302
- Type: protected I2CE_FieldContainer_Factory $factory
Methods
__construct()
Create a new instance of a I2CE_FieldContainer object.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 277
- Signature: public function __construct($factory,$name,$id)
- Parameters:
- I2CE_FieldContainer_Factory $factory
- string $name
The name of this field container - integer $id
- Default Value: '0'
__get()
Return the field value from the $fields array.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 385
- Signature: public function __get($key)
- Parameters:
- string $key
- Returns: mixed
__isset()
Check to see if a field value has been set.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 413
- Signature: public function __isset($key)
- Parameters:
- string $key
- Returns: boolean
__set()
Set the field value in the $fields array.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 398
- Signature: public function __set($key,$value)
- Parameters:
__unset()
Unset a field.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 425
- Signature: public function __unset($key)
- Parameters:
- string $key
addField()
Adds a field to this form.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 341
- Signature: public function addField($name,$args)
- Parameters:
- Returns: mixed
I2CE_FormField or false on failure
addFields()
Adds fields to the field container as indicated by the data arra
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 311
- Signature: protected function addFields($data)
- Parameters:
- array $data
An array with keys the name of a field and values an array of defining data.
- array $data
cleanup()
Clean up all the fields for this field container. This will unset all the fields associated with this field container. This will remove all circular references to this field container so it can be cleaned up by the garbage collector. This should only be called when the field container is no longer needed. Trying to access it after this may cause unexpected results or errors.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 442
- Signature: public function cleanup($remove_from_cache)
- Parameters:
- boolean $remove_from_cache
Defaults to true in which case we remove it from the factory's field container cache as well- Default Value: true
- boolean $remove_from_cache
clearFields()
Remove fields from the container This is to be used when only certain fields of the container are being dealt with so the others can be removed to save processing.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 461
- Signature: public function clearFields($fields,$keep)
- Parameters:
current()
Return the current value for the $fields array for iterating through the fields.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 246
- Signature: public function current()
- Returns: mixed
getAttribute()
Return the attribute value for a given attribute.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 111
- Signature: public function getAttribute($key)
- Parameters:
- string $key
- Returns: mixed
getAttributes()
Returns the array of attributes for this container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 295
- Signature: protected function getAttributes()
- Returns: array
getContainerType()
Return the value for the type of this container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 180
- Signature: public function getContainerType()
- Returns: string
or null on failure
getField()
Return the I2CE_FormField for the given field name.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 215
- Signature: public function getField($field)
- Parameters:
- string $field
the field name or a form name:field name
- string $field
- Returns: I2CE_FormField
getFieldNames()
Get the names of all the fields added in this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 205
- Signature: public function getFieldNames()
- Returns: array
of string, the field names.
getHTMLName()
Return the value for the name attribute to be used for this form to be used as part of a request variable
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 194
- Signature: public function getHTMLName()
- Returns: string
getId()
Returns the id for this record.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 74
- Signature: public function getId()
- Returns: string
getLoad()
Get the request variable in the format expected from {load()}
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 543
- Signature: public function getLoad()
getMeta()
Return the meta attribute value for a given meta.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 144
- Signature: public function getMeta($key)
- Parameters:
- string $key
- Returns: mixed
getName()
Return the name for this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 172
- Signature: public function getName()
- Returns: string
getNameId()
Returns the name and id for this record.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 66
- Signature: public function getNameId()
- Returns: string
of the form "$name|$id"
getPost()
Get the nested associative array that is used for post
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 527
- Signature: public function getPost($field_names,$skip_invalid,$include_id)
- Parameters:
- Returns: array
getQueryDisplay()
Return the values of all the fields that are set.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 664
- Signature: public function getQueryDisplay($field_names,$skip_invalid)
- Parameters:
- Returns: string
getQueryFields()
Return all the fields as an associative array
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 632
- Signature: public function getQueryFields($field_names,$skip_invalid,$html_name)
- Parameters:
- array $field_names
Array of string, the field names we wish to query. Defaults to null in which we case we get all fields- Default Value: null
- boolean $skip_invalid
Defaults to true in which case we skip invalid values- Default Value: true
- boolean $html_name
Use the html name as teh key in the returned array. Defaults to true. If false we use the field name- Default Value: true
- array $field_names
- Returns: array
getQueryString()
Return all the fields as a query string to be sent to a URL
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 602
- Signature: public function getQueryString($field_names,$skip_invalid)
- Parameters:
- Returns: string
hasAttribute()
Return true if a given attribute exists for this field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 124
- Signature: public function hasAttribute($key)
- Parameters:
- string $key
- Returns: boolean;
hasInvalid()
Checks to see if any fields of form has in invalid message
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 710
- Signature: public function hasInvalid()
- Returns: boolean
hasMeta()
Return true if a given meta attribute exists for this field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 153
- Signature: public function hasMeta($key)
- Parameters:
- string $key
- Returns: boolean;
isValid()
Check to see if the named field is valid
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 725
- Signature: public function isValid($field)
- Parameters:
- string $field
- Returns: boolean;
key()
Return the current key for the $fields array for iterating through the fields.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 253
- Signature: public function key()
- Returns: mixed
load()
Load the member variables from an array
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 566
- Signature: public function load($post,$loadID,$populate_on_set_id)
- Parameters:
- array $post
The Post vairables. Usually from an http request. - boolean $loadID
Defaults to true. If true, and there is exactly one of entry in the array $post[<<NAME>>][$this->name], we set the values of the containerss field, id and parent from that entry. If false, we set the values from $post[<<TYPE>>][$this->name][$this->getID()] if it is present- Default Value: true
- $populate_on_set_id
- Default Value: true
- array $post
next()
Advance the internal pointer for the $fields array for iterating through the fields.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 259
- Signature: public function next()
removeField()
Removes a field from this field container. @param array $args The arguments for this field
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 368
- Signature: public function removeField($name)
- Parameters:
- string $name
rewind()
Rewind the internal pointer for the $fields array for iterating through the fields.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 239
- Signature: public function rewind()
setAttribute()
Set an attribute for this field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 102
- Signature: public function setAttribute($key,$value)
- Parameters:
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/Fields/lib/I2CE_FieldContainer.php on line 484
- Signature: public function setFromPost($post,$populate_on_set_id)
- Parameters:
- array $post
- $populate_on_set_id
- Default Value: false
setId()
Set the id for this record.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 83
- Signature: public function setId($id)
- Parameters:
- mixed $id
setMeta()
Set a meta attribute for this field container.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 135
- Signature: public function setMeta($key,$value)
- Parameters:
setName()
Set the name for this field container
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 163
- Signature: public function setName($name)
- Parameters:
- string $name
valid()
Check to see if the current internal pointer for the $fields array is valid.
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 266
- Signature: public function valid()
- Returns: boolean
validate()
Validate all fields that are marked as required or unique. This will check all the fields in this form and if they're required or unique it will perform the required checks
- Defined in i2ce/modules/Forms/modules/Fields/lib/I2CE_FieldContainer.php on line 699
- Signature: public function validate()
Inherited Methods
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()