\FormExtra
FormExtra
Extend your forms from this class instead of Form to add extra functionalities
- Shortcut for returning messages or errors
- Autoload form data on error
- Author: lekoala
Synopsis
class FormExtra
extends Form
{
- // constants
- const MSG_NOTICE = 'notice';
- const MSG_WARNING = 'warning';
- const MSG_BAD = 'bad';
- const MSG_GOOD = 'good';
- // members
- protected boolean $keepSessionAlive = true;
- protected boolean $dataLossWarning = false;
- protected $dataLossMessage = NULL;
- // methods
- public void __construct()
- public void forTemplate()
- public void storeBackURL()
- public void getKeepSessionAlive()
- public void setKeepSessionAlive()
- public void getDataLossWarning()
- public void setDataLossWarning()
- public void getDataLossMessage()
- public void setDataLossMessage()
- public void setControllerMessage()
- public void getSessionKey()
- public void saveDataInSession()
- public void clearDataFromSession()
- public void getDataFromSession()
- public void restoreDataFromSession()
- protected SS_HTTPResponse err()
- protected SS_HTTPResponse success()
- protected SS_HTTPResponse msg()
- public ZenValidator getValidator()
Hierarchy
Extends
- Form
Constants
Name | Value |
---|---|
MSG_NOTICE | 'notice' |
MSG_WARNING | 'warning' |
MSG_BAD | 'bad' |
MSG_GOOD | 'good' |
Members
protected
- $dataLossMessage
- $dataLossWarning
- $keepSessionAlive
Methods
protected
- err() — Shortcut for an error
- msg() — Return a response with a message for your form
- success() — Shortcut for a success
public
- __construct()
- clearDataFromSession()
- forTemplate()
- getDataFromSession()
- getDataLossMessage()
- getDataLossWarning()
- getKeepSessionAlive()
- getSessionKey()
- getValidator()
- restoreDataFromSession()
- saveDataInSession()
- setControllerMessage() — Set a message on the controller. Useful is the form is not displayed in the redirected page
- setDataLossMessage()
- setDataLossWarning()
- setKeepSessionAlive() — Define if we want to have a little js script that pings Security/ping
- storeBackURL()