Property | Type | Description | |
---|---|---|---|
$container | The Container this form belongs to | ||
$entities | array | Prototypes for all fields and rules are here.
Array's structure:
entities:
{ENTITY_NAME}:
{KEY}: {OBJECT}
|
|
$model | The model attached to this view | ||
$view | FOF30\View\DataView\DataViewInterface | The view used to render this form |
Method | Description | |
---|---|---|
__construct ( |
Method to instantiate the form object. | |
addFieldPath ( string $new = null ) : void | WARNING: THIS IS IGNORED IN FOF3! | |
addFormPath ( string $new = null ) : void | WARNING: THIS IS IGNORED IN FOF3! | |
addHeaderPath ( string $new = null ) : void | WARNING: THIS IS IGNORED IN FOF3! | |
addRulePath ( string $new = null ) : void | WARNING: THIS IS IGNORED IN FOF3! | |
bind ( mixed $data ) : boolean | Method to bind data to the form. | |
getAttribute ( string $attribute, mixed $default = null ) : mixed | Returns the value of an attribute of the form itself | |
getContainer ( ) : |
Get a reference to the form's Container | |
getData ( ) : JRegistry | Returns a reference to the protected $data object, allowing direct access to and manipulation of the form's data. | |
getHeader ( string $name, string $group = null, mixed $value = null ) : FOF30\Form\HeaderInterface | boolean | Method to get a header field represented as a HeaderInterface object. | |
getHeaderset ( ) : array | Method to get an array of FormHeader objects in the headerset. | |
getModel ( ) : |
Returns the DataModel attached to this form | |
getView ( ) : FOF30\View\DataView\DataViewInterface | Returns the DataViewInterface attached to this form | |
loadCSSFiles ( ) : void | Loads the CSS files defined in the form, based on its cssfiles attribute | |
loadClass ( string $entity, string $type ) : mixed | Load a class for one of the form's entities of a particular type. | |
loadFile ( string $file, boolean $reset = true, boolean $xpath = false ) : boolean | Method to load the form description from an XML file. | |
loadJSFiles ( ) : void | Loads the Javascript files defined in the form, based on its jsfiles attribute | |
removeHeader ( string $name, string $group = null ) : boolean | Method to remove a header from the form definition. | |
setContainer ( |
Set the form's Container | |
setModel ( |
Attaches a DataModel to this form | |
setView ( FOF30\View\DataView\DataViewInterface &$view ) : void | Attaches a DataViewInterface to this form |
Method | Description | |
---|---|---|
bindLevel ( string $group, mixed $data ) : void | Method to bind data to the form for the group level. | |
findField ( string $name, string $group = null ) : mixed | Method to get a form field represented as an XML element object. | |
findHeader ( string $name, string $group = null ) : mixed | Method to get a header field represented as an XML element object. | |
findHeadersByGroup ( mixed $group = null, boolean $nested = false ) : SimpleXMLElement | boolean |
Method to get an array of |
|
loadField ( string $element, string $group = null, mixed $value = null ) : mixed | Method to load, setup and return a JFormField object based on field data. | |
loadFieldType ( string $type, boolean $new = true ) : FOF30\Form\FieldInterface | boolean | Proxy for {@link Helper::loadFieldType()}. | |
loadHeader ( string $element, string $group = null ) : FOF30\Form\HeaderInterface | boolean | Method to load, setup and return a HeaderInterface object based on field data. | |
loadHeaderType ( string $type, boolean $new = true ) : FOF30\Form\HeaderInterface | boolean | Proxy for {@link Helper::loadHeaderType()}. | |
loadRuleType ( string $type, boolean $new = true ) : JFormRule | boolean | Proxy for {@link Helper::loadRuleType()}. | |
loadType ( string $entity, string $type, boolean $new = true ) : mixed | Method to load a form entity object given a type. | |
modelToBindSource ( |
Converts a DataModel into data suitable for use with the form. The difference to the Model's getData() method is that we process hasOne and belongsTo relations. This is a recursive function which will be called at most $maxLevel deep. You can set this in the form XML file, in the relation_depth attribute. |
public __construct ( |
||
$container | The component Container where this form belongs to | |
$name | string | The name of the form. |
$options | array | An array of form options. |
public static addFieldPath ( string $new = null ) : void | ||
$new | string | IGNORED! |
return | void |
public static addFormPath ( string $new = null ) : void | ||
$new | string | IGNORED! |
return | void |
public static addHeaderPath ( string $new = null ) : void | ||
$new | string | IGNORED! |
return | void |
public static addRulePath ( string $new = null ) : void | ||
$new | string | IGNORED! |
return | void |
protected findHeadersByGroup ( mixed $group = null, boolean $nested = false ) : SimpleXMLElement | boolean | ||
$group | mixed | The optional dot-separated form group path on which to find the fields. Null will return all fields. False will return fields not in a group. |
$nested | boolean | True to also include fields in nested groups that are inside of the group for which to find fields. |
return | SimpleXMLElement | boolean | Boolean false on error or array of SimpleXMLElement objects. |
public getContainer ( ) : |
||
return |
public getData ( ) : JRegistry | ||
return | JRegistry | The form's data registry |
public getHeader ( string $name, string $group = null, mixed $value = null ) : FOF30\Form\HeaderInterface | boolean | ||
$name | string | The name of the header field. |
$group | string | The optional dot-separated form group path on which to find the field. |
$value | mixed | The optional value to use as the default for the field. (DEPRECATED) |
return | FOF30\Form\HeaderInterface | boolean | The HeaderInterface object for the field or boolean false on error. |
public getHeaderset ( ) : array | ||
return | array | The array of HeaderInterface objects in the headerset. |
public getModel ( ) : |
||
return |
public getView ( ) : FOF30\View\DataView\DataViewInterface | ||
return | FOF30\View\DataView\DataViewInterface |
public loadCSSFiles ( ) : void | ||
return | void |
protected loadField ( string $element, string $group = null, mixed $value = null ) : mixed | ||
$element | string | The XML element object representation of the form field. |
$group | string | The optional dot-separated form group path on which to find the field. |
$value | mixed | The optional value to use as the default for the field. |
return | mixed | The JFormField object for the field or boolean false on error. |
protected loadFieldType ( string $type, boolean $new = true ) : FOF30\Form\FieldInterface | boolean | ||
$type | string | The field type. |
$new | boolean | Flag to toggle whether we should get a new instance of the object. |
return | FOF30\Form\FieldInterface | boolean | FieldInterface object on success, false otherwise. |
public loadFile ( string $file, boolean $reset = true, boolean $xpath = false ) : boolean | ||
$file | string | The filesystem path of an XML file. |
$reset | boolean | Flag to toggle whether form fields should be replaced if a field already exists with the same group/name. |
$xpath | boolean | An optional xpath to search for the fields. |
return | boolean | True on success, false otherwise. |
protected loadHeader ( string $element, string $group = null ) : FOF30\Form\HeaderInterface | boolean | ||
$element | string | The XML element object representation of the form field. |
$group | string | The optional dot-separated form group path on which to find the field. |
return | FOF30\Form\HeaderInterface | boolean | The HeaderInterface object for the field or boolean false on error. |
protected loadHeaderType ( string $type, boolean $new = true ) : FOF30\Form\HeaderInterface | boolean | ||
$type | string | The field type. |
$new | boolean | Flag to toggle whether we should get a new instance of the object. |
return | FOF30\Form\HeaderInterface | boolean | HeaderInterface object on success, false otherwise. |
public loadJSFiles ( ) : void | ||
return | void |
protected modelToBindSource ( |
||
$model | The item to dump its contents into an array | |
$maxLevel | integer | Maximum nesting level of relations to process. Default: 1. |
$modelsProcessed | array | Array of the fully qualified model class names already processed. |
return | array |
public setContainer ( |
||
$container |
protected Container,FOF30\Container $container | ||
return |
entities:
{ENTITY_NAME}:
{KEY}: {OBJECT}
protected array $entities | ||
return | array |
protected DataModel,FOF30\Model $model | ||
return |