constructor IsterUIFormConnector
IsterUIFormConnector IsterUIFormConnector(
)
|
|
Constructor
$this->required = $this->required | ISTER_UI_REQ_APPLICATION | ISTER_UI_REQ_TEMPLATE | ISTER_UI_REQ_SQL;
method getDataObject
object IsterSqlDataObject &getDataObject(
)
|
|
Get the data object by reference.
method getForm
Get the form object by reference.
method newAction
boolean newAction(
array
$action)
|
|
Callback method called from IsterUIConDesc.
Parameters:
method newField
boolean newField(
array
$descr)
|
|
Callback method called from IsterUIConDesc.
Parameters:
method newForm
boolean newForm(
array
$form)
|
|
Callback method called from IsterUIConDesc.
If no form object was set, this method tries to instantiate a new form object following the current description. Note that it is impossible for automatically created form objects to pass custom parameters to the constructor.
Parameters:
method newGroup
boolean newGroup(
string
$descr, array
$group)
|
|
Callback method called from IsterUIConDesc.
Parameters:
method newObject
boolean newObject(
array
$descr)
|
|
Callback method called from IsterUIConDesc.
If no data object was set, this method tries to instantiate a new data object following the current description. Also, the setFunctionNames() method of the data object is called due to the description. Note that it is impossible for automatically created data objects to pass custom parameters to the constructor.
Parameters:
method run
Execute the current connector.
If no data are present in the current $request object, the form will be updated by the data object, otherwiese vice versa.
Overrides
IsterUIComponent::run() (Execute this object.)
method setApplication
boolean setApplication(
object IsterAppMain
&$app)
|
|
Set the application object.
This method automatically creates an IsterHttpSecurityPolicy for the current request but not for pathinfo (may change in the future).
Overrides
IsterUIBase::setApplication() (Set the application object.)
Parameters:
method setDataObject
boolean setDataObject(
object IsterSqlDataObject
&$object)
|
|
Set the data object.
Usually the data object will automatically be created by the connector.
Parameters:
method setForm
Set the form.
Usually, a form will automatically be created by the connector. If you set it yourself, you should not forget to set the form's request also to the connector using setApplication(). If you already set an IsterHttpSecurityPolicy to the form it will be overridden by the connector following the rules of the description.
Parameters:
method setID
boolean setID(
mixed
$id)
|
|
Set the data object's unique identifier.
This will be used only if the data object is automatically created. The default object id is 0.
Parameters:
method toString
Return a string representation of this object.
In the template you can access each form field by its name. Missing required form fields can be accessed by '<name>_MISSED'. The '*_MISSED' variables are only defined and set to 1 if the field is actually missing. The same holds true for '<name>_MARKED' variables indicating all fields marked by the current security policy.
Also the object's columns are added to the template, but form fields with the same name as a column overwrite the column in the template.
Note: the template will be destroyed by this method.
Overrides
IsterUIComponent::toString() (Return a string representation of this component.)
method updateDataObject
boolean updateDataObject(
)
|
|
Update data object's properties by form field.
This will automatically apply the current security policy.
method updateForm
Update form fields by data object's properties.
If a column for a given form field is not found, this field will be filled with its default value if defined in the description. If no id has been set for data object, the data object's makeID() method will be called which may set an ID.