Class PifaAbstractFormProcessor
This form post helper should simplify the implementation of typical form processing. Its main method process() wraps the steps read data from request, validate data and persist data in database. In order to make this approach more customizable three protected "event handler" were defined that can be implemented by a concrete implementation of this class. These allow to preprocess the data read from the request before it's going to be validated and to be postprocessed after it's been persisted into the database.
Direct known subclasses
DefaultFormProcessorIndirect known subclasses
MailedFormProcessorPackage: Plugin\FormAssistant
Copyright: four for business AG
Author: marcus.gnass
Located at plugins/form_assistant/classes/class.pifa.abstract_form_processor.php
public
|
#
__construct(
Create an instance. The processor aggregates the form module and the form. The idform is read from the given modules settings. |
public
|
|
public
|
|
public
|
|
public
|
|
abstract protected
|
#
_processReadData( )
Template method to postprocess data that has just been read from request. This can be usefull e.g. to remove default values for certain form fields. |
abstract protected
|
#
_processValidatedData( )
Template method to postprocess data that has just been validated. I cannot yet imagine a situatio where this could be useful but added this method for completeness' sake. |
abstract protected
|
#
_processStoredData( )
Template method to postprocess data that has just been stored to database. This can be usefull e.g. to send form values via email or process them in another way. |
public
|
#
process( )
Processes a form. Therefor the forms values are read from the appropriate request, validated and written to database. After each step a method is called that allows to postprocess the forms data or even the form itself. This postprocessing is optional and can be implemented in concrete implementations of this abstratc class |
private
|
$_module
|
#
NULL
|
protected
|
$_form
|
#
NULL
|