Class: I2CE FormFactory (4.0.14)

From IHRIS Wiki
Revision as of 09:53, 24 May 2011 by Litlfred (talk | contribs) (Created page with '{{otherversions|Class: I2CE_FormFactory}} This article describes the class ''I2CE_FormFactory'' . *Extends the class: [[Class: I2CE_FieldContainer_Factory (4.0.14) | I2CE_FieldCo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This article describes the class I2CE_FormFactory .

This factory is used to create instances of I2CE_Form objects from the form name.

Variables

$instance

The single instance of this class. //maybe not needed when updating to php 5.3

$classes

The classes that have been registered with the factory.

Methods

__construct()

_createContainer()

Worker method to create an instance of an I2CE_Form from the factory.

_getFieldData()

Get data needed to create all the fields in this field container

_loadMetaAttributes()

Returns the array of attributes for this container

callStatic()

Call a static function in the form's class object.

createForm()

Return an instance of a I2CE_Form from the factory.

  • Defined in i2ce/modules/Forms/lib/I2CE_FormFactory.php on line 231
  • Signature: public function createForm($nameId,$no_cache)
  • Parameters:
    • mixed $nameId
      The a string which is either the name of the field container, the name and id in the form of "$name|$id" or an array with two elements, the first is a name and the second is an id
    • boolean $no_cache
      Defaults to false. If true then we don't check the cache when the id is non-zero
      • Default Value: false
  • Returns: I2CE_From
    or null on failure

exists()

Checks to see if the given form has been registered.

getAttributeData()

Recursive method to rraverse the class hierarchy to get the meta data for the form magic data @param array &$data array

getClassHierarchy()

Get the class hierarchy associated to a class.

  • Defined in i2ce/modules/Forms/lib/I2CE_FormFactory.php on line 104
  • Signature: public function getClassHierarchy($form)
  • Parameters:
    • $form
  • Returns: array
    The keys of the array range from 0 to N. The value of key 0 is the class associated to the form. The last key is has value 'I2CE_Form'. Returns null in error.

getClassName()

getConst()

Shortcut to retrieving a constant value from a form's class object.

getContainerType()

Return type of container this factory makes

getFormFieldsData()

Recursive method to rraverse the class hierarchy to get the field data from magic data

getForms()

get the available forms.

getNames()

get the available forms.

getStatic()

Return a static variable from the form's class object.

instance()

Return the instance of this factory and create it if it doesn't exist.

Inherited Methods

cleanup()

This public method is inherited from I2CE_FieldContainer_Factory->cleanup()

clearFieldData()

This public method is inherited from I2CE_FieldContainer_Factory->clearFieldData()

createContainer()

This public method is inherited from I2CE_FieldContainer_Factory->createContainer()

getFieldData()

This public method is inherited from I2CE_FieldContainer_Factory->getFieldData()

getFieldNames()

This public method is inherited from I2CE_FieldContainer_Factory->getFieldNames()

getMetaAttribute()

This public method is inherited from I2CE_FieldContainer_Factory->getMetaAttribute()

hasMetaAttribute()

This public method is inherited from I2CE_FieldContainer_Factory->hasMetaAttribute()

loadMetaAttributes()

This public method is inherited from I2CE_FieldContainer_Factory->loadMetaAttributes()

removeFromCache()

This public method is inherited from I2CE_FieldContainer_Factory->removeFromCache()

setMetaAttribute()

This public method is inherited from I2CE_FieldContainer_Factory->setMetaAttribute()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$instance

Theis protected variable is inherited from I2CE_FieldContainer_Factory->$instance

$meta

Theis protected variable is inherited from I2CE_FieldContainer_Factory->$meta

$fieldData

Theis protected variable is inherited from I2CE_FieldContainer_Factory->$fieldData

$containerCache

Theis protected variable is inherited from I2CE_FieldContainer_Factory->$containerCache

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()

Fuzzy Methods

getRecords()

This method is implemented by I2CE_FormStorage->getRecords()

hasRecord()

This method is implemented by I2CE_FormStorage->hasRecord()