IElementFactory
Converts IProperty to IElement.
Makes html inputs from properties.
Table of Contents
createElement() | Create an HTML Element from a property. | IElement |
---|---|---|
createFormInputs() | For a given model, generate a series of HTML form inputs. | array |
Methods
createElement()
Create an HTML Element from a property.
public
createElement(
$model :
IModel
, $property :
IProperty
, $name :
string
, $id :
string
, $value :
string
)
: IElement
Parameters
- $model : IModel
- $property : IProperty
Property
- $name : string
Element name attribute value
- $id : string
Element Id attribute value
- $value : string
Property value from model getter.
Tags
Return values
IElement —Element
createFormInputs()
For a given model, generate a series of HTML form inputs.
public
createFormInputs(
$model :
IModel
[, $attrs :
array
= [] ]
)
: array
Parameters
- $model : IModel
- $attrs : array = []
Return values
array —Configuration data for an animator/renderer. [ 'name' => [ 'for' => "Property Name" '' => "Property Caption" ], 'html' => "The html element code" ]