Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • 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 PifaField

PIFA field item class. It's a kind of a model.

cGenericDb
Extended by cItemBaseAbstract
Extended by Item
Extended by PifaField
Package: Plugin\FormAssistant
Copyright: four for business AG
Author: marcus.gnass
Located at plugins/form_assistant/classes/class.pifa.field.php
Methods summary
public
# __construct( mixed $id = false )

Create an instance.

Create an instance.

Parameters

$id
mixed
$id ID of item to be loaded or false

Throws

cInvalidArgumentException
If table name or primary key is not set

Overrides

Item::__construct()
public mixed
# getField( string $field, boolean $bSafe = true )

Rule has to be stripslashed to allow regular expressions with backslashes.

Rule has to be stripslashed to allow regular expressions with backslashes.

Parameters

$field
string
$sField Specifies the field to retrieve
$bSafe
boolean
$bSafe Flag to run defined outFilter on passed value

Returns

mixed
Value of the field

See

Item::getField()

Overrides

Item::getField()
public
# getLastError( )

Getter for protected prop.

Getter for protected prop.

public mixed
# getValue( )

Returns this fields stored value.

Returns this fields stored value.

Returns

mixed
the $_value
public
# setValue( mixed $value )

Parameters

$value
mixed
$_value
public array
# getFile( )

keys: name, tmp_name

keys: name, tmp_name

Returns

array
the $_file
public
# setFile( array $_file )

Parameters

$_file
array
$_file
public
# validate( )

Throws

PifaValidationException
if an error occured
public string
# toHtml( array $errors = NULL )

Returns HTML for this form that should be displayed in frontend.

Returns HTML for this form that should be displayed in frontend.

Parameters

$errors
array
$errors to be displayed for form field

Returns

string
public cHTMLLabel
# _getElemLabel( )

Returns

cHTMLLabel

Todo

should be private, right?
public cHTMLTextbox
# _getElemField( )

Creates the HTML for a form field.

Creates the HTML for a form field.

The displayed value of a form field can be set via a GET param whose name has to be the fields column name which is set if the form is displayed for the first time and user hasn't entered another value.

Returns

cHTMLTextbox
cHTMLTextarea cHTMLPasswordbox cHTMLSpan cHTMLSelectElement NULL cHTMLButton

Throws

PifaNotImplementedException
if field type is not implemented

Todo

should be private, right?
public Ambigous
# _getElemHelp( )

Returns

Ambigous
<NULL, cHTMLParagraph>

Todo

should be private, right?
public Ambigous
# _getElemScript( )

Returns

Ambigous
<NULL, cHTMLScript>

Todo

should be private, right?
public static array
# getFieldTypeIds( )

Returns an array containing all field type ids.

Returns an array containing all field type ids.

Returns

array
public static array
# getFieldTypeNames( )

Returns an array containing all field type ids mapped to their names.

Returns an array containing all field type ids mapped to their names.

The order of field types in this array influences the order of icons displayed in the backend for selection!

Returns

array
public static string
# getFieldTypeName( integer $fieldTypeId )

Return the field type name for the given field type id.

Return the field type name for the given field type id.

Parameters

$fieldTypeId
integer
$fieldType

Returns

string
public string
# getMyFieldTypeName( )

Return this fields type name.

Return this fields type name.

Returns

string
public
# getDbDataType( )

Returns a string describing this fields database data type as used in MySQL CREATE and ALTER TABLE statements.

Returns a string describing this fields database data type as used in MySQL CREATE and ALTER TABLE statements.

Throws

PifaException
if field is not loaded
PifaException
if field type is not implemented
public
# delete( )

Deletes this form with all its fields and stored data. The forms data table is also dropped.

Deletes this form with all its fields and stored data. The forms data table is also dropped.

public
# showField( string $columnName )

Determines for which form field types which data should be editable in backend.

Determines for which form field types which data should be editable in backend.

Parameters

$columnName
string
$columnName for data to edit
public array
# getOptions( )

Returns

array
Methods inherited from Item
_inFilter(), _loadByWhereClause(), _onLoad(), _outFilter(), _setMetaObject(), deleteProperty(), deletePropertyById(), get(), getMetaObject(), getProperty(), isLoaded(), loadBy(), loadByMany(), loadByPrimaryKey(), loadByRecordSet(), set(), setField(), setFilters(), setProperty(), store(), toArray(), toObject()
Methods inherited from cItemBaseAbstract
_getPropertiesCollectionInstance(), _getSecondDBInstance(), escape()
Methods inherited from cGenericDb
_executeCallbacks(), register(), unregister()
Constants summary
integer VARCHAR_SIZE 255
#

Size to use for VARCHAR fields. Remember: the maximum row size for the used table type, not counting BLOBs, is 65535.

Size to use for VARCHAR fields. Remember: the maximum row size for the used table type, not counting BLOBs, is 65535.

Todo

PIFA should be able to calculate the size for one record by the size of its fields and handle it accordingly.
integer INPUTTEXT 1
#

Input field for single-line text.

Input field for single-line text.

integer TEXTAREA 2
#

Input field for multi-line text.

Input field for multi-line text.

integer INPUTPASSWORD 3
#

Input field for single-line password.

Input field for single-line password.

integer INPUTRADIO 4
#

Radiobox.

Radiobox.

integer INPUTCHECKBOX 5
#

Checkbox

Checkbox

integer SELECT 6
#

Selectbox allowing for selection of a single option.

Selectbox allowing for selection of a single option.

integer SELECTMULTI 7
#

Selectbox allowing for selection of multiple options.

Selectbox allowing for selection of multiple options.

integer DATEPICKER 8
#

Input field for date selection.

Input field for date selection.

integer INPUTFILE 9
#

Input field for file selection.

Input field for file selection.

integer PROCESSBAR 10
#

Processbar.

Processbar.

integer SLIDER 11
#

Slider.

Slider.

integer BUTTONSUBMIT 13
#

Button of type submit.

Button of type submit.

integer BUTTONRESET 14
#

Button of type reset.

Button of type reset.

integer BUTTONBACK 15
#

General button.

General button.

Deprecated

use PifaField::BUTTON instead
integer BUTTON 15
#

General button.

General button.

integer MATRIX 16
#
integer PARA 17
#

A text to be displayed between form fields. It's no form field on its own but should be handled like one.

A text to be displayed between form fields. It's no form field on its own but should be handled like one.

integer INPUTHIDDEN 18
#

A hidden input field.

A hidden input field.

integer FIELDSET_BEGIN 19
#

Begin of a fieldset.

Begin of a fieldset.

integer FIELDSET_END 20
#

End of a fieldset.

End of a fieldset.

integer BUTTONIMAGE 21
#

Button of type image (which is in fact a submit button).

Button of type image (which is in fact a submit button).

Constants inherited from cGenericDb
CREATE_BEFORE, CREATE_FAILURE, CREATE_SUCCESS, DELETE_BEFORE, DELETE_FAILURE, DELETE_SUCCESS, STORE_BEFORE, STORE_FAILURE, STORE_SUCCESS
Properties summary
private mixed $_value NULL
#

The form fields value.

The form fields value.

private array $_file NULL
#

The file that was transmitted in case of INPUTFILE.

The file that was transmitted in case of INPUTFILE.

Properties inherited from Item
$_arrInFilters, $_arrOutFilters, $_lastSQL, $_metaObject, $modifiedValues, $oldPrimaryKey, $values
Properties inherited from cItemBaseAbstract
$_className, $_oCache, $_settings, $db, $lasterror, $primaryKey, $properties, $secondDb, $table, $virgin
CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0