Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cContentTypePifaForm
  • DefaultFormModule
  • DefaultFormProcessor
  • ExampleOptionsDatasource
  • MailedFormProcessor
  • Pifa
  • PifaAbstractFormModule
  • PifaAbstractFormProcessor
  • PifaAjaxHandler
  • PifaExporter
  • PifaExternalOptionsDatasourceInterface
  • PifaField
  • PifaFieldCollection
  • PifaForm
  • PifaFormCollection
  • PifaImporter
  • PifaLeftBottomPage
  • PifaRightBottomFormDataPage
  • PifaRightBottomFormExportPage
  • PifaRightBottomFormFieldsPage
  • PifaRightBottomFormImportPage
  • PifaRightBottomFormPage
  • SolrRightBottomPage

Exceptions

  • PifaDatabaseException
  • PifaException
  • PifaIllegalStateException
  • PifaMailException
  • PifaNotImplementedException
  • PifaNotYetStoredException
  • PifaValidationException
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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

DefaultFormProcessor

Indirect known subclasses

MailedFormProcessor
Abstract
Package: Plugin\FormAssistant
Copyright: four for business AG
Author: Marcus Gnaß <marcus.gnass@4fb.de>
Located at plugins/form_assistant/classes/class.pifa.abstract_form_processor.php
Methods summary
public
# __construct( PifaAbstractFormModule $module = NULL, integer $idform = NULL )

Create an instance. The processor aggregates the form module and the form. The idform is read from the given modules settings.

Create an instance. The processor aggregates the form module and the form. The idform is read from the given modules settings.

In former implementations of the processor the modules had no settings and thus no idform. Thats why optionally the idform gan be given explicitly. This shoud be removed when all processors are refactored.

Parameters

$module
PifaAbstractFormModule
$module
$idform
integer
$idform

Throws

PifaException
if id of form could not be determined from module or param
PifaException
if form could not be loaded
public PifaAbstractFormModule
# getModule( )

Returns

PifaAbstractFormModule
public
# setModule( PifaAbstractFormModule $_module )

Parameters

$_module
PifaAbstractFormModule
$_module
public PifaForm
# getForm( )

Returns

PifaForm
public
# setForm( PifaForm $_form )

Parameters

$_form
PifaForm
$_form
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.

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.

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.

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

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

Throws

PifaException
if there is no form to process
PifaValidationException
if data is invalid
PifaDatabaseException
if data could not be stored
Properties summary
private PifaAbstractFormModule $_module NULL
#
protected PifaForm $_form NULL
#

Todo

Should be private instead of protected as it can be accessed via getForm()
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0