Class FOFFormHelper

Description

FOFForm's helper class.

Provides a storage for filesystem's paths where FOFForm's entities reside and methods for creating those entities. Also stores objects with entities' prototypes for further reusing.

  • since: 2.0

Located in /libraries/fof/form/helper.php (line 22)

JFormHelper
   |
   --FOFFormHelper
Method Summary
 static array addHeaderPath ([mixed $new = null])
 static mixed loadClass (string $entity, string $type)
 static mixed loadFieldClass (string $type)
 static mixed loadFieldType (string $type, [boolean $new = true])
 static mixed loadHeaderClass (string $type)
 static mixed loadHeaderType (string $type, [boolean $new = true])
 static mixed loadType (string $entity, string $type, [boolean $new = true])
Variables

Inherited Variables

Inherited from JFormHelper

JFormHelper::$entities
JFormHelper::$paths
Methods
static addHeaderPath (line 227)

Method to add a path to the list of header include paths.

  • return: The list of paths that have been added.
  • access: public
static array addHeaderPath ([mixed $new = null])
  • mixed $new: A path or array of paths to add.
static loadClass (line 137)

Load a class for one of the form's entities of a particular type.

Currently, it makes sense to use this method for the "field" and "rule" entities (but you can support more entities in your subclass).

  • return: Class name on success or false otherwise.
  • since: 2.0
  • access: public
static mixed loadClass (string $entity, string $type)
  • string $entity: One of the form entities (field or rule).
  • string $type: Type of an entity.

Redefinition of:
JFormHelper::loadClass()
Load a class for one of the form's entities of a particular type.
static loadFieldClass (line 105)

Attempt to import the JFormField class file if it isn't already imported.

You can use this method outside of JForm for loading a field for inheritance or composition.

  • return: Class name on success or false otherwise.
  • since: 11.1
  • access: public
static mixed loadFieldClass (string $type)
  • string $type: Type of a field whose class should be loaded.

Redefinition of:
JFormHelper::loadFieldClass()
Attempt to import the JFormField class file if it isn't already imported.
static loadFieldType (line 34)

Method to load a form field object given a type.

  • return: JFormField object on success, false otherwise.
  • since: 11.1
  • access: public
static mixed loadFieldType (string $type, [boolean $new = true])
  • string $type: The field type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.

Redefinition of:
JFormHelper::loadFieldType()
Method to load a form field object given a type.
static loadHeaderClass (line 120)

Attempt to import the FOFFormHeader class file if it isn't already imported.

You can use this method outside of JForm for loading a field for inheritance or composition.

  • return: Class name on success or false otherwise.
  • since: 11.1
  • access: public
static mixed loadHeaderClass (string $type)
  • string $type: Type of a field whose class should be loaded.
static loadHeaderType (line 49)

Method to load a form field object given a type.

  • return: JFormField object on success, false otherwise.
  • since: 11.1
  • access: public
static mixed loadHeaderType (string $type, [boolean $new = true])
  • string $type: The field type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.
static loadType (line 67)

Method to load a form entity object given a type.

Each type is loaded only once and then used as a prototype for other objects of same type. Please, use this method only with those entities which support types (forms don't support them).

  • return: Entity object on success, false otherwise.
  • since: 11.1
  • access: protected
static mixed loadType (string $entity, string $type, [boolean $new = true])
  • string $entity: The entity.
  • string $type: The entity type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.

Redefinition of:
JFormHelper::loadType()
Method to load a form entity object given a type.

Inherited Methods

Inherited From JFormHelper

 JFormHelper::addFieldPath()
 JFormHelper::addFormPath()
 JFormHelper::addPath()
 JFormHelper::addRulePath()
 JFormHelper::loadClass()
 JFormHelper::loadFieldClass()
 JFormHelper::loadFieldType()
 JFormHelper::loadRuleClass()
 JFormHelper::loadRuleType()
 JFormHelper::loadType()

Documentation generated on Tue, 19 Nov 2013 15:04:39 +0100 by phpDocumentor 1.4.3