FORMidable RAD Framework

tx_ameosformidable Class Reference

List of all members.

Public Member Functions

 init (&$oParent, $mXml, $iForcedEntryId=FALSE)
 initAPI (&$oParent)
 makeHtmlParser ()
 useJs ()
 initAddPost ()
 editionRequested ()
 refineTS ($aConf)
 refineTS_renderlet ($sTen, $aTenDot)
 checkPoint ($aPoints)
 _processRdtCheckPoints (&$aPoints)
 _processMetaCheckPoints ($aPoints)
 _includeSandBox ()
 _createSandBox ($sClassName)
 initSteps (&$oParent, $aSteps)
 _getStepperId ()
 _getStep ()
 __extractStep ()
 __cbkFilterEvents ($sName)
 __getEventsInConf ($aConf)
 _grabServerAndAjaxEvents ($aData=FALSE)
 _getServerEventId ($sRdtName, $aEvent)
 _getAjaxEventId ($sRdtName, $aEvent)
 _getClientEventId ($sRdtName, $aEvent)
 _processServerEvents ($aTriggers)
 _getServerEventParams ()
 _getRawPost ($sFormId=FALSE, $bCache=TRUE)
 _includeLibraries ()
 _filterUnProcessed ()
 unsetRenderlet ($sName)
 initFromTs (&$oParent, $aConf, $iForcedEntryId=FALSE)
 _compileConf ($aConf, &$aTempDebug)
 _insertXmlBuilder ($aConf, $aTemp=array())
 _insertSubXml ($aConf, &$aDebug, $sParent=FALSE)
 _insertSubTS ($aConf, $aTemp=array())
 _getTS ($sTSPath)
 _substituteDynaXml ($aXml, $aDynaXml)
 _deleteEmpties ($aConf)
 _applyLocalModifiers ($aSubConf)
 _applyModifiers ($aConf)
 _forceEntryId ($iForcedEntryId=FALSE)
 forceEntryId ($iForcedEntryId=FALSE)
 _removeDots ($aData, $aTemp=FALSE, $sParentKey=FALSE)
 _addDots ($aData, $aTemp=FALSE)
 _getVersion ()
 _initDataHandler ($iForcedEntryId=FALSE)
 _initRenderer ()
 _initDataSources ()
 _makeDataSources ($aConf, $sXPath)
 _initRenderlets ()
 _makeRenderlets ($aConf, $sXPath, $bChilds, &$oChildParent, $bOverWrite=FALSE)
 _loadXmlConf ()
 _getAnonymousName ($aElement)
 _getMeta ($sPath)
 file_readBin ($sPath)
 file_writeBin ($sPath, $sData, $bUTF8=TRUE)
 _getXml ($sPath, $isSubXml=FALSE)
 _loadObject ($sInternalKey, $sObjectType)
 _loadDeclaredDataSources ()
 _loadDeclaredDataHandlers ()
 _loadDeclaredRenderlets ()
 _loadDeclaredRenderers ()
 _loadDeclaredValidators ()
 _loadDeclaredActionlets ()
 isTemplateMethod ($sToken)
 templateDataAsString ($mData)
 executeTemplateMethod ($mData, $sCall)
 parseForTemplate ($sPath)
 resolveForTemplate ($sPath, $aConf=FALSE, $mStackedValue=array())
 resolveForTemplate_atomic ($sPath, $aConf=AMEOSFORMIDABLE_LEXER_VOID, $sNextPath=FALSE)
 _navConf ($path, $aConf=-1, $sSep="/")
 navDef ($sPath, $mDefault, $aConf=-1)
 xPath ($sPath, $aConf=-1, $bIncludeParent=FALSE)
 render ()
 _render ()
 attachRdtEvents ()
 attachAccessibilityInit ()
 _restoreViewState ()
 attachInitTask ($sScript, $sDesc="", $sKey=FALSE, $bOutsideLoad=FALSE)
 attachInitTaskUnobtrusive ($sScript)
 attachInitTask_plain ($sScript, $sDesc="", $sKey=FALSE, $bOutsideLoad=FALSE)
 attachInitTask_ajax ($sScript, $sDesc="", $sKey=FALSE, $bOutsideLoad=FALSE)
 _renderElements ($bRenderChilds=FALSE)
 _renderElement (&$oRdt)
 _getInfosForType ($type, $aCollectionInfos)
 _getInfosDataSourceForType ($sType)
 _getInfosDataHandlerForType ($sType)
 _getInfosRendererForType ($sType)
 _getInfosRenderletForType ($sType)
 _getInfosValidatorForType ($sType)
 _getInfosActionletForType ($sType)
 _makeDataSource ($aElement, $sXPath)
 _makeDataHandler ($aElement)
 _makeRenderer ($aElement)
 _makeRenderlet ($aElement, $sXPath)
 _makeValidator ($aElement)
 _makeActionlet ($aElement)
_makeObject ($aElement, $sNature, $sXPath)
 validateEverything ()
 validateEverythingDraft ()
 _validateGlobalValidators ()
 _validateGlobalValidatorsDraft ()
 _validateElements ()
 _validateElementsDraft ()
 _validateElement ($aElement)
 _matchConditions ($aConditioner)
 _matchCondition ($aCondition)
 _declareValidationError ($sElementName, $sKey, $sMessage)
 _hasErrorType ($sKey)
 declareAjaxService ($sExtKey, $sServiceKey, $bVirtualizeFE=TRUE, $bInitBEuser=FALSE)
 _executeActionlets ($aRendered, $sForm)
 _executeActionlet ($aActionlet, $aRendered, $sForm)
 debug ($bExpand=FALSE)
 _debug ($variable, $name, $bAnalyze=TRUE)
 mayday ($msg)

Public Attributes

 $bInited = FALSE
 $bInitFromTs = FALSE
 $_xmlPath = null
 $_xmlData = null
 $_aConf = null
 $sExtPath = null
 $sExtRelPath = null
 $sExtWebPath = null
 $_aValidators = null
 $_aDataSources = null
 $_aDataHandlers = null
 $_aRenderers = null
 $_aRenderlets = null
 $_aActionlets = null
 $oRenderer = null
 $oDataHandler = null
 $aORenderlets = array()
 $aODataSources = array()
 $oSandBox = null
 $oJs = null
 $oJson = null
 $aInitTasksUnobtrusive = array()
 $aInitTasks = array()
 $aInitTasksOutsideLoad = array()
 $aInitTasksAjax = array()
 $_aValidationErrors = array()
 $_aValidationErrorsInfos = array()
 $_aValidationErrorsTypes = array()
 $bDebug = FALSE
 $bDebugIP = FALSE
 $aDebug = array()
 $start_tstamp = null
 $formid = ""
 $_oParent = null
 $oParent = null
 $bRendered = FALSE
 $aSteps = FALSE
 $_aStep = FALSE
 $sApiVersion = null
 $iForcedEntryId = FALSE
 $_aSubXmlCache = array()
 $_aInjectedData = array()
 $aLastTs = array()
 $cObj = null
 $bStoreFormInSession = FALSE
 $bStoreParentInSession = FALSE
 $aServerEvents = array()
 $aAjaxEvents = array()
 $aTempDebug = array()
 $aCrossRequests = array()
 $aOnloadEvents
 $aSkinManifests = array()
 $__aRunningObjects = array()
 $oHtml = FALSE
 $aRdtEvents = array()
 $aPreRendered = array()
 $oMajixEvent = FALSE
 $aUserObjParamsStack = array()
 $aForcedUserObjParamsStack = array()
 $aAvailableCheckPoints
 $aAddPostVars = FALSE
 $aRawPost = array()
border __pad0__: 2px solid red
padding __pad1__: 10px
color __pad2__: white
background color: red
font family: Verdana
font size: 12px

Detailed Description

Definition at line 54 of file class.tx_ameosformidable.php.


Member Function Documentation

tx_ameosformidable::init ( &$  oParent,
mXml,
iForcedEntryId = FALSE 
)

Standard init function Initializes :

// CURRENT SERVER EVENT CHECKPOINTS ( means when to process the even; ex: <onclick runat="server" when="after-compilation"> ) // DEFAULT IS *after-init* // // start // before-compilation // before-compilation // after-compilation // before-init // before-init-renderer // after-init-renderer // before-init-renderlets // after-init-renderlets // before-init-datahandler // after-init-datahandler // after-init // before-render // after-render // end

Parameters:
object Parent extension using FORMidable
mixed Absolute path to the XML configuration file
[type] $iForcedEntryId: ...
Returns:
void

Definition at line 199 of file class.tx_ameosformidable.php.

References $iForcedEntryId, $oParent, _compileConf(), _createSandBox(), _debug(), _grabServerAndAjaxEvents(), _includeSandBox(), _initDataHandler(), _initDataSources(), _initRenderer(), _initRenderlets(), _loadDeclaredActionlets(), _loadDeclaredDataHandlers(), _loadDeclaredDataSources(), _loadDeclaredRenderers(), _loadDeclaredRenderlets(), _loadDeclaredValidators(), _loadXmlConf(), _makeDataHandler(), _makeRenderer(), _navConf(), checkPoint(), editionRequested(), forceEntryId(), initAddPost(), makeHtmlParser(), mayday(), and refineTS().

Referenced by initFromTs(), and initSteps().

tx_ameosformidable::makeHtmlParser (  ) 

Makes a persistent instance of an HTML parser Mainly used for template processing

Returns:
void

Definition at line 517 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::refineTS ( aConf  ) 

Takes an array of typoscript configuration, and adapt it to formidable syntax

Parameters:
array $aConf: TS array for application
Returns:
array Refined array

Definition at line 564 of file class.tx_ameosformidable.php.

References _removeDots(), and refineTS_renderlet().

Referenced by init().

tx_ameosformidable::refineTS_renderlet ( sTen,
aTenDot 
)

Takes a typoscript conf for a renderlet and refines it to formidable-syntax

Parameters:
string $sTen: TS name like: 10 = renderlet:TEXT
array $aTenDot: TS value of 10. like: 10.value = Hello World !
Returns:
array refined conf

Definition at line 672 of file class.tx_ameosformidable.php.

References _removeDots().

Referenced by refineTS().

tx_ameosformidable::checkPoint ( aPoints  ) 

Dispatch calls to checkpoints defined in the whole code of formidable Similar to hooks

Parameters:
array $aPoints: names of the checkpoints to consider
Returns:
void

Definition at line 750 of file class.tx_ameosformidable.php.

References _processMetaCheckPoints(), _processRdtCheckPoints(), and _processServerEvents().

Referenced by _render(), and init().

tx_ameosformidable::_processRdtCheckPoints ( &$  aPoints  ) 

Handles checkpoint-calls on renderlets

Parameters:
array $aPoints: names of the checkpoints to consider
Returns:
void

Definition at line 762 of file class.tx_ameosformidable.php.

Referenced by checkPoint().

tx_ameosformidable::_includeSandBox (  ) 

Includes the sandbox in php context

Returns:
mixed FALSE or name of the sandbox class

Definition at line 796 of file class.tx_ameosformidable.php.

References _navConf(), and mayday().

Referenced by init().

tx_ameosformidable::_createSandBox ( sClassName  ) 

Builds a persistent instance of the sandbox

Parameters:
string $sClassName: Name of the sandbox class, as returned by _includeSandBox()
Returns:
void

Definition at line 894 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::initSteps ( &$  oParent,
aSteps 
)

[Describe function...]

Parameters:
[type] $$oParent: ...
[type] $aSteps: ...
Returns:
[type] ...

Definition at line 909 of file class.tx_ameosformidable.php.

References $aSteps, $oParent, __extractStep(), _getStep(), and init().

tx_ameosformidable::_getStepperId (  ) 

[Describe function...]

Returns:
[type] ...

Definition at line 936 of file class.tx_ameosformidable.php.

Referenced by __extractStep().

tx_ameosformidable::_getStep (  ) 

[Describe function...]

Returns:
[type] ...

Definition at line 950 of file class.tx_ameosformidable.php.

References __extractStep().

Referenced by initSteps().

tx_ameosformidable::__extractStep (  ) 

[Describe function...]

Returns:
[type] ...

Definition at line 965 of file class.tx_ameosformidable.php.

References _getStepperId().

Referenced by _getStep(), and initSteps().

tx_ameosformidable::__cbkFilterEvents ( sName  ) 

Util-method for use in __getEventsInConf

Parameters:
string $sName: name of the current conf-key
Returns:
boolean TRUE if event (onXYZ), FALSE if not

Definition at line 1001 of file class.tx_ameosformidable.php.

tx_ameosformidable::__getEventsInConf ( aConf  ) 

Extracts all events defined in a conf array

Parameters:
array $aConf: conf containing events to detect
Returns:
array events extracted

Definition at line 1011 of file class.tx_ameosformidable.php.

Referenced by _grabServerAndAjaxEvents().

tx_ameosformidable::_grabServerAndAjaxEvents ( aData = FALSE  ) 

Extracts and registers server AND ajax events

Parameters:
array $aData: internal use only (recursivity)
Returns:
void

Definition at line 1026 of file class.tx_ameosformidable.php.

References __getEventsInConf(), _getAnonymousName(), _getServerEventId(), _navConf(), and mayday().

Referenced by init().

tx_ameosformidable::_getServerEventId ( sRdtName,
aEvent 
)

Creates unique ID for a given server event

Parameters:
string $sRdtName: name of the renderlet defining the event
array $aEvent: conf array of the event
Returns:
string Server Event ID

Definition at line 1128 of file class.tx_ameosformidable.php.

Referenced by _getAjaxEventId(), _getClientEventId(), and _grabServerAndAjaxEvents().

tx_ameosformidable::_getAjaxEventId ( sRdtName,
aEvent 
)

Creates unique ID for a given ajax event

Parameters:
string $sRdtName: name of the renderlet defining the event
array $aEvent: conf array of the event
Returns:
string Ajax Event ID

Definition at line 1141 of file class.tx_ameosformidable.php.

References _getServerEventId().

tx_ameosformidable::_getClientEventId ( sRdtName,
aEvent 
)

Creates unique ID for a given client event

Parameters:
string $sRdtName: name of the renderlet defining the event
array $aEvent: conf array of the event
Returns:
string Client Event ID

Definition at line 1152 of file class.tx_ameosformidable.php.

References _getServerEventId().

tx_ameosformidable::_processServerEvents ( aTriggers  ) 

Executes triggered server events Called by checkPoint()

Parameters:
array $aTriggers: array of checkpoints names to consider
Returns:
void

Definition at line 1163 of file class.tx_ameosformidable.php.

References _getRawPost(), and _getServerEventParams().

Referenced by checkPoint().

tx_ameosformidable::_getServerEventParams (  ) 

Get params for the triggered server event

Returns:
array Params

Definition at line 1201 of file class.tx_ameosformidable.php.

References _getRawPost().

Referenced by _processServerEvents().

tx_ameosformidable::_getRawPost ( sFormId = FALSE,
bCache = TRUE 
)

Returns RAW POST+FILES data

Parameters:
string $sFormId: optional; if none given, current formid is used
Returns:
array POST+FILES data

Definition at line 1223 of file class.tx_ameosformidable.php.

Referenced by _getServerEventParams(), _processServerEvents(), and initAddPost().

tx_ameosformidable::_includeLibraries (  ) 

Loads declared libraries, like scriptaculous To declare: /meta/libs = scriptaculous, lib_x, lib_y

Returns:
void

Definition at line 1277 of file class.tx_ameosformidable.php.

References _navConf().

Referenced by _render().

tx_ameosformidable::_filterUnProcessed (  ) 

Unsets renderlets having /process = FALSE

Returns:
void

Definition at line 1298 of file class.tx_ameosformidable.php.

References unsetRenderlet().

Referenced by _render().

tx_ameosformidable::unsetRenderlet ( sName  ) 

Unsets the rdt corresponding to the given name Also unsets it's childs if any, and it's validators-errors if any

Parameters:
string $sName: ...
Returns:
void

Definition at line 1317 of file class.tx_ameosformidable.php.

Referenced by _filterUnProcessed().

tx_ameosformidable::initFromTs ( &$  oParent,
aConf,
iForcedEntryId = FALSE 
)

Initialize formidable with typoscript

Parameters:
object &$oParent: ref to parent object (usualy plugin)
array $aConf: typoscript array
integer $iForcedEntryId: optional; uid to edit, if any
Returns:
void

Definition at line 1357 of file class.tx_ameosformidable.php.

References $iForcedEntryId, $oParent, and init().

tx_ameosformidable::_compileConf ( aConf,
&$  aTempDebug 
)

Refine raw conf and: -> inserts recursively all includexml declared -> inserts recursively all includets declared -> apply modifiers declared, if any -> remove sections emptied by modifiers, if any -> execute xmlbuilders declared, if any

Parameters:
array $aConf: array of raw config to refine
[type] $aTempDebug: internal use
Returns:
array refined array of conf

Definition at line 1374 of file class.tx_ameosformidable.php.

References $aTempDebug, _applyModifiers(), _debug(), _deleteEmpties(), _insertSubTS(), _insertSubXml(), and _insertXmlBuilder().

Referenced by init().

tx_ameosformidable::_insertXmlBuilder ( aConf,
aTemp = array() 
)

Executes and inserts conf generated by xmlbuilders, if any declared

Parameters:
array $aConf: array of conf to process
array $aTemp: optional; internal use
Returns:
array processed array of conf

Definition at line 1400 of file class.tx_ameosformidable.php.

Referenced by _compileConf().

tx_ameosformidable::_insertSubXml ( aConf,
&$  aDebug,
sParent = FALSE 
)

Insert conf referenced by includexml tags

Parameters:
array $aConf: array of conf to process
array $aDebug: internal use
string $sParent: optional; parent xpath
Returns:
array processed conf array

Definition at line 1433 of file class.tx_ameosformidable.php.

References $aDebug, _getXml(), _substituteDynaXml(), and xPath().

Referenced by _compileConf().

tx_ameosformidable::_insertSubTS ( aConf,
aTemp = array() 
)

Inserts conf declared by includets

Parameters:
array $aConf: array of conf to process
array $aTemp: optional; internal use
Returns:
array processed conf array

Definition at line 1565 of file class.tx_ameosformidable.php.

References _getTS().

Referenced by _compileConf().

tx_ameosformidable::_getTS ( sTSPath  ) 

Utility function for _insertSubTS

Parameters:
string $sTSPath: ts path to get
Returns:
mixed ts conf

Definition at line 1617 of file class.tx_ameosformidable.php.

References _navConf(), and _removeDots().

Referenced by _insertSubTS().

tx_ameosformidable::_substituteDynaXml ( aXml,
aDynaXml 
)

Obsolete method

Parameters:
array $aXml: ...
array $aDynaXml: ...
Returns:
array ...

Definition at line 1634 of file class.tx_ameosformidable.php.

Referenced by _insertSubXml().

tx_ameosformidable::_deleteEmpties ( aConf  ) 

Removes conf-sections emptied by modifiers, if any

Parameters:
array $aConf: array of conf to refine
Returns:
array processed conf array

Definition at line 1652 of file class.tx_ameosformidable.php.

Referenced by _applyLocalModifiers(), and _compileConf().

tx_ameosformidable::_applyLocalModifiers ( aSubConf  ) 

Utility method for _applyModifiers()

Parameters:
array $aSubConf
Returns:
array

Definition at line 1675 of file class.tx_ameosformidable.php.

References _deleteEmpties(), _matchConditions(), and _navConf().

Referenced by _applyModifiers().

tx_ameosformidable::_applyModifiers ( aConf  ) 

Applies declared modifiers, if any

Parameters:
array $aConf: conf to process
Returns:
array processed conf

Definition at line 1705 of file class.tx_ameosformidable.php.

References _applyLocalModifiers().

Referenced by _compileConf().

tx_ameosformidable::_forceEntryId ( iForcedEntryId = FALSE  ) 

Forces datahandler to edit the given uid

Parameters:
int $iForcedEntryId: uid to edit
Returns:
void

Definition at line 1731 of file class.tx_ameosformidable.php.

References $iForcedEntryId.

Referenced by forceEntryId().

tx_ameosformidable::_removeDots ( aData,
aTemp = FALSE,
sParentKey = FALSE 
)

Removes dots in typoscript configuration arrays

Parameters:
array $aData: typoscript conf
array $aTemp: internal use
string $sParentKey: key in conf currently processed
Returns:
array conf without TS dotted notation

Definition at line 1747 of file class.tx_ameosformidable.php.

Referenced by _getTS(), refineTS(), and refineTS_renderlet().

tx_ameosformidable::_addDots ( aData,
aTemp = FALSE 
)

Add dots to an array to have a typoscript-like structure

Parameters:
array $aData: plain conf
array $aTemp
Returns:
array typoscript dotted conf

Definition at line 1776 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getVersion (  ) 

Returns the current version of formidable running

Returns:
string current formidable version number

Definition at line 1800 of file class.tx_ameosformidable.php.

tx_ameosformidable::_initDataHandler ( iForcedEntryId = FALSE  ) 

Initializes the declared datahandler

Parameters:
int $iForcedEntryId: optional; uid to edit, if any
Returns:
void

Definition at line 1812 of file class.tx_ameosformidable.php.

References $iForcedEntryId, _debug(), _makeDataHandler(), and _navConf().

Referenced by init().

tx_ameosformidable::_initRenderer (  ) 

Initializes the declared renderer

Returns:
void

Definition at line 1857 of file class.tx_ameosformidable.php.

References _makeRenderer(), and _navConf().

Referenced by init().

tx_ameosformidable::_initDataSources (  ) 

Initializes the declared datasources

Returns:
void

Definition at line 1868 of file class.tx_ameosformidable.php.

References _makeDataSources(), and _navConf().

Referenced by init().

tx_ameosformidable::_makeDataSources ( aConf,
sXPath 
)

Initializes the declared datasources

Parameters:
array $aConf: conf as given in /control/datasources/*
string $sXPath: xpath from where the given conf comes
Returns:
void ...

Definition at line 1883 of file class.tx_ameosformidable.php.

References _makeDataSource().

Referenced by _initDataSources().

tx_ameosformidable::_initRenderlets (  ) 

Initializes the declared Renderlets

Returns:
void

Definition at line 1908 of file class.tx_ameosformidable.php.

References _makeRenderlets(), and _navConf().

Referenced by init().

tx_ameosformidable::_makeRenderlets ( aConf,
sXPath,
bChilds,
&$  oChildParent,
bOverWrite = FALSE 
)

Initializes the declared Renderlets

Parameters:
array $aConf: array of conf; usually /renderlets/*
string $sXPath: xpath from where the given conf comes
boolean $bChilds: TRUE if initializing childs, FALSE if not
boolean $bOverWrite: if FALSE, two renderlets declared with the same name will trigger a mayday
Returns:
array array of references to built renderlets

Definition at line 1927 of file class.tx_ameosformidable.php.

References _getAnonymousName(), _makeRenderlet(), and mayday().

Referenced by _initRenderlets().

tx_ameosformidable::_loadXmlConf (  ) 

Loads the internal _aConf configuration array from the XML file IMPORTANT NOTE : the root /formidable is deleted, so all pathes shouldn't start with /formidable

Returns:
void

Definition at line 1982 of file class.tx_ameosformidable.php.

References _getXml().

Referenced by init().

tx_ameosformidable::_getAnonymousName ( aElement  ) 

Generates an anonymous name for a renderlet

Parameters:
array $aElement: conf of the renderlet
Returns:
string anonymous name generated

Definition at line 1994 of file class.tx_ameosformidable.php.

Referenced by _grabServerAndAjaxEvents(), and _makeRenderlets().

tx_ameosformidable::_getMeta ( sPath  ) 

Obsolete

Parameters:
[type] $sPath: ...
Returns:
[type] ...

Definition at line 2006 of file class.tx_ameosformidable.php.

References _getXml().

tx_ameosformidable::file_readBin ( sPath  ) 

Binary-reads a file

Parameters:
string $sPath: absolute server path to file
Returns:
string file contents

Definition at line 2017 of file class.tx_ameosformidable.php.

Referenced by _getXml().

tx_ameosformidable::file_writeBin ( sPath,
sData,
bUTF8 = TRUE 
)

Binary-writes a file

Parameters:
string $sPath: absolute server path to file
string $sData: file contents
boolean $bUTF8: add UTF8-BOM or not ?
Returns:
void

Definition at line 2036 of file class.tx_ameosformidable.php.

Referenced by _getXml().

tx_ameosformidable::_getXml ( sPath,
isSubXml = FALSE 
)

Reads and parse an xml file, and returns an array of XML Fresh or cached data, depending on $this->conf["cache."]["enabled"]

Parameters:
string $sPath: abs server path to xml file
boolean $isSubXml
Returns:
array xml data

Definition at line 2054 of file class.tx_ameosformidable.php.

References file_readBin(), file_writeBin(), and mayday().

Referenced by _getMeta(), _insertSubXml(), and _loadXmlConf().

tx_ameosformidable::_loadObject ( sInternalKey,
sObjectType 
)

Includes and makes instance of the desired object

Parameters:
string $sInternalKey: name of the object; something like rdt_text, dh_db, ...
string $sObjectType: type of the object; something like renderlets, datahandlers, ...
Returns:
object Built object or FALSE if failed

Definition at line 2176 of file class.tx_ameosformidable.php.

Referenced by _makeObject().

tx_ameosformidable::_loadDeclaredDataSources (  ) 

Loads the internal collection of available datasources

Returns:
void

Definition at line 2238 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::_loadDeclaredDataHandlers (  ) 

Loads the internal collection of available datahandlers

Returns:
void

Definition at line 2248 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::_loadDeclaredRenderlets (  ) 

Loads the internal collection of available renderlets

Returns:
void

Definition at line 2258 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::_loadDeclaredRenderers (  ) 

Loads the internal collection of available renderers

Returns:
void

Definition at line 2268 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::_loadDeclaredValidators (  ) 

Loads the internal collection of available validators

Returns:
void

Definition at line 2278 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::_loadDeclaredActionlets (  ) 

Loads the internal collection of available actionlets

Returns:
void

Definition at line 2288 of file class.tx_ameosformidable.php.

Referenced by init().

tx_ameosformidable::xPath ( sPath,
aConf = -1,
bIncludeParent = FALSE 
)

Resolves an xpath and returns value pointed by this xpath

Parameters:
string $sPath: xpath
Returns:
mixed

Definition at line 2844 of file class.tx_ameosformidable.php.

References _navConf().

Referenced by _insertSubXml(), and _navConf().

tx_ameosformidable::render (  ) 

Alias for _render()

Returns:
string

Definition at line 2939 of file class.tx_ameosformidable.php.

References _render().

Referenced by _renderElement().

tx_ameosformidable::_render (  ) 

Renders the whole application

Returns:
string Full rendered HTML

Definition at line 2948 of file class.tx_ameosformidable.php.

References _debug(), _executeActionlets(), _filterUnProcessed(), _includeLibraries(), _renderElements(), _restoreViewState(), attachAccessibilityInit(), attachInitTask(), attachRdtEvents(), checkPoint(), debug(), mayday(), useJs(), validateEverything(), and validateEverythingDraft().

Referenced by render().

tx_ameosformidable::_restoreViewState (  ) 

Obsolete function

Returns:
[type] ...

Definition at line 3294 of file class.tx_ameosformidable.php.

References attachInitTask().

Referenced by _render().

tx_ameosformidable::attachInitTask ( sScript,
sDesc = "",
sKey = FALSE,
bOutsideLoad = FALSE 
)

Declares a JS task to execute at page init time

Parameters:
string $sScript: JS code
string $sDesc: optional; description of the code, place as a comment in the HTML
string $sKey: optional; key of the js code in the header array
boolean $bOutsideLoad: optional; load it at onload time, or after
Returns:
void

Definition at line 3324 of file class.tx_ameosformidable.php.

References attachInitTask_ajax(), and attachInitTask_plain().

Referenced by _render(), _restoreViewState(), attachAccessibilityInit(), and attachRdtEvents().

tx_ameosformidable::_renderElements ( bRenderChilds = FALSE  ) 

Renders all the Renderlets elements as defined in conf

Parameters:
boolean $bRenderChilds: render childs ? or not
Returns:
array Array of rendered elements, structured as $elementname => $renderedHTML

Definition at line 3391 of file class.tx_ameosformidable.php.

References _renderElement().

Referenced by _render().

tx_ameosformidable::_renderElement ( &$  oRdt  ) 

Renders the given Renderlet

Parameters:
array $aElement: details about the Renderlet to render, extracted from conf
Returns:
string The Rendered HTML

Definition at line 3421 of file class.tx_ameosformidable.php.

References render().

Referenced by _renderElements().

tx_ameosformidable::_getInfosForType ( type,
aCollectionInfos 
)

Returns system informations about an object-type

Parameters:
string $type: something like TEXT, IMAGE, ...
array $aCollectionInfos: the collection of objects where to get infos
Returns:
mixed array of info or FALSE if failed

Definition at line 3452 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getInfosDataSourceForType ( sType  ) 

Returns system-informations about the given datasource type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3472 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getInfosDataHandlerForType ( sType  ) 

Returns system-informations about the given datahandler type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3482 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getInfosRendererForType ( sType  ) 

Returns system-informations about the given renderer type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3492 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getInfosRenderletForType ( sType  ) 

Returns system-informations about the given renderlet type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3502 of file class.tx_ameosformidable.php.

tx_ameosformidable::_getInfosValidatorForType ( sType  ) 

Returns system-informations about the given validator type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3512 of file class.tx_ameosformidable.php.

Referenced by _validateElement().

tx_ameosformidable::_getInfosActionletForType ( sType  ) 

Returns system-informations about the given actionlet type

Parameters:
string $type: given type
Returns:
array system-informations

Definition at line 3522 of file class.tx_ameosformidable.php.

tx_ameosformidable::_makeDataSource ( aElement,
sXPath 
)

Makes and initializes a datasource object

Parameters:
array $aElement: conf for this object instance
string $sXPath: xpath where this conf is declared
Returns:
object

Definition at line 3533 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _makeDataSources().

tx_ameosformidable::_makeDataHandler ( aElement  ) 

Makes and initializes a datahandler object

Parameters:
array $aElement: conf for this object instance
Returns:
object

Definition at line 3543 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _initDataHandler(), and init().

tx_ameosformidable::_makeRenderer ( aElement  ) 

Makes and initializes a renderer object

Parameters:
array $aElement: conf for this object instance
Returns:
object

Definition at line 3553 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _initRenderer(), and init().

tx_ameosformidable::_makeRenderlet ( aElement,
sXPath 
)

Makes and initializes a renderlet object

Parameters:
array $aElement: conf for this object instance
string $sXPath: xpath where this conf is declared
Returns:
object

Definition at line 3564 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _makeRenderlets().

tx_ameosformidable::_makeValidator ( aElement  ) 

Makes and initializes a validator object

Parameters:
array $aElement: conf for this object instance
Returns:
object

Definition at line 3574 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _validateElement().

tx_ameosformidable::_makeActionlet ( aElement  ) 

Makes and initializes an actionlet object

Parameters:
array $aElement: conf for this object instance
string $sXPath: xpath where this conf is declared
Returns:
object

Definition at line 3585 of file class.tx_ameosformidable.php.

References _makeObject().

Referenced by _executeActionlet().

& tx_ameosformidable::_makeObject ( aElement,
sNature,
sXPath 
)

Makes and initializes an object

Parameters:
array $aElement: conf for this object instance
array $sNature: renderers, datahandlers, ...
string $sXPath: xpath where this conf is declared
Returns:
object

Definition at line 3597 of file class.tx_ameosformidable.php.

References _loadObject(), and mayday().

Referenced by _makeActionlet(), _makeDataHandler(), _makeDataSource(), _makeRenderer(), _makeRenderlet(), and _makeValidator().

tx_ameosformidable::_validateElements (  ) 

Validates data returned by all the Renderlets elements as defined in conf

Returns:
void Writes into $this->_aValidationErrors[] using tx_ameosformidable::_declareValidationError()

Definition at line 3636 of file class.tx_ameosformidable.php.

References _validateElement().

Referenced by validateEverything().

tx_ameosformidable::_validateElementsDraft (  ) 

Validates data returned by all the Renderlets, draft-mode

Returns:
void

Definition at line 3654 of file class.tx_ameosformidable.php.

References $aORenderlets, and _validateElement().

Referenced by validateEverythingDraft().

tx_ameosformidable::_validateElement ( aElement  ) 

Validates the given Renderlet element

Parameters:
array $aElement: details about the Renderlet element to validate, extracted from XML conf / used in formidable_mainvalidator::_doTheMagic()
Returns:
void Writes into $this->_aValidationErrors[] using tx_ameosformidable::_declareValidationError()

Definition at line 3675 of file class.tx_ameosformidable.php.

References _getInfosValidatorForType(), _makeValidator(), _matchConditions(), and _navConf().

Referenced by _validateElements(), and _validateElementsDraft().

tx_ameosformidable::_matchConditions ( aConditioner  ) 

Return

Parameters:
[type] $aConditioner: ...
Returns:
[type] ...

Definition at line 3730 of file class.tx_ameosformidable.php.

References _matchCondition(), and _navConf().

Referenced by _applyLocalModifiers(), and _validateElement().

tx_ameosformidable::_matchCondition ( aCondition  ) 

[Describe function...]

Parameters:
[type] $aCondition: ...
Returns:
[type] ...

Definition at line 3770 of file class.tx_ameosformidable.php.

Referenced by _matchConditions().

tx_ameosformidable::_declareValidationError ( sElementName,
sKey,
sMessage 
)

Declares validation error Used by Validators Objects

Parameters:
string $elementname: not used for the moment
string $key: not used for the moment
string $message: the error message to display
Returns:
void Writes into $this->_aValidationErrors[]

Definition at line 3882 of file class.tx_ameosformidable.php.

tx_ameosformidable::declareAjaxService ( sExtKey,
sServiceKey,
bVirtualizeFE = TRUE,
bInitBEuser = FALSE 
)

[Describe function...]

Parameters:
[type] $sExtKey: ...
[type] $sServiceKey: ...
[type] $bVirtualizeFE: ...
[type] $bInitBEuser: ...
Returns:
[type] ...

Definition at line 3917 of file class.tx_ameosformidable.php.

tx_ameosformidable::_executeActionlets ( aRendered,
sForm 
)

Execute each actionlet declared for this FORM

Parameters:
array $aRendered: array containing the HTML of the rendered renderlets
string $sForm: the whole FORM html string
Returns:
void
See also:
tx_ameosformidable::_render()

Definition at line 3932 of file class.tx_ameosformidable.php.

References _executeActionlet(), and _navConf().

Referenced by _render().

tx_ameosformidable::_executeActionlet ( aActionlet,
aRendered,
sForm 
)

Executes the specific process for this actionlet

Parameters:
array $aActionlet: details about the Renderlet element to validate, extracted from XML conf / used in formidable_mainvalidator::_doTheMagic()
array $aRendered: array containing the HTML of the rendered renderlets
string $sForm: the whole FORM html string
Returns:
void
See also:
tx_ameosformidable::_executeActionlets()

Definition at line 3955 of file class.tx_ameosformidable.php.

References _makeActionlet().

Referenced by _executeActionlets().

tx_ameosformidable::debug ( bExpand = FALSE  ) 

Displays a full debug of :

Can be called by the parent Extension, or by FORMidable itselves, if the XML conf sets /formidable/meta/debug/ to TRUE

Parameters:
[type] $bExpand: ...
Returns:
void
See also:
tx_ameosformidable::mayday(), tx_ameosformidable::_render()

Definition at line 3990 of file class.tx_ameosformidable.php.

Referenced by _render().

tx_ameosformidable::_debug ( variable,
name,
bAnalyze = TRUE 
)

Internal debug function Calls the TYPO3 debug function if the XML conf sets /formidable/meta/debug/ to TRUE

Parameters:
mixed $variable: the variable to dump
string $name: title of this debug section
string $line: PHP code line calling this function ( __LINE__ )
string $file: PHP script calling this function ( __FILE__ )
integer $recursiveDepth: number of levels to debug, if recursive variable
string $debugLevel: the sensibility of this warning
Returns:
void

Definition at line 4071 of file class.tx_ameosformidable.php.

References $aDebug.

Referenced by _compileConf(), _initDataHandler(), _render(), and init().

tx_ameosformidable::mayday ( msg  ) 

Stops Formidable and PHP execution : die() if some critical error appeared

Parameters:
string $msg: the error message
Returns:
void

Definition at line 4138 of file class.tx_ameosformidable.php.

References $aDebug, color, and family.

Referenced by _getXml(), _grabServerAndAjaxEvents(), _includeSandBox(), _makeObject(), _makeRenderlets(), _render(), and init().


Member Data Documentation

tx_ameosformidable::$aOnloadEvents

Initial value:

 array( // stores events that have to be thrown at onload ( onDOMReady actually )
                "ajax"          => array(),
                "client"        => array()
        )

Definition at line 120 of file class.tx_ameosformidable.php.

tx_ameosformidable::$aAvailableCheckPoints

Initial value:

 array(
                "start",
                "before-compilation",   // kept for back-compat, but should not be here
                "after-compilation",
                "before-init",
                "before-init-renderer",
                "after-init-renderer",
                "before-init-renderlets",
                "after-init-renderlets",
                "before-init-datahandler",
                "after-init-datahandler",
                "after-init",
                "before-render",
                "after-validation",
                "after-render",
                "end",
        )

Definition at line 136 of file class.tx_ameosformidable.php.


The documentation for this class was generated from the following file:


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6