Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
653d1e97
Commit
653d1e97
authored
Feb 05, 2016
by
Carsten Rose
Browse files
CODING.md: updates
parent
11e2de14
Changes
1
Hide whitespace changes
Inline
Side-by-side
CODING.md
0 → 100644
View file @
653d1e97
Notes / Best Practices for Coding
=================================
General
=======
*
When qfq starts, it looks for the formname at:
1.
Typo3 Bodytext Element,
2.
For the 'SIP' ($_GET['s'])
3.
$_GET variables 'form' and 'r' (=recordId)
*
The active formname is stored in $this->store->setVar(SYSTEM_FORM, $formName, STORE_SYSTEM);
*
In QuickFormQuery.php the whole Form will be copied to $this->formSpec and depending on further processing, the elements are
available in $this->feNative and $this->feAction.
*
The Form specificaton (table form) will be evaluated after loading.
*
The FormElement specification will be evaluated later on in BuildForm
*
.php
*
Get the recent SIP, Formname, RecordId with:
[src] $this->store->getVar('form', STORE_SIP), or
[src] $this->store->getStore(STORE_SIP)
*
Check Contstants.php for known Store members
Debug / Log / Errormessages
===========================
*
Before firing a SQL or doing processing of an FormElement, set some debugging / error variables:
[src] $this->store->setVar(SYSTEM_SQL_RAW, STORE_SYSTEM)
*
Available fields:
<code>
SYSTEM_SQL_RAW
SYSTEM_SQL_FINAL
SYSTEM_SQL_COUNT
SYSTEM_SQL_PARAM_ARRAY
SYSTEM_FORM = CLIENT_FORM; // '
<formName>
/
<formId>
'
SYSTEM_FORM_ELEMENT = 'formElement'; // '
<formElementName>
/
<formElementeId>
'
SYSTEM_FORM_ELEMENT_COLUMN = 'formElementColumn'; // '
<columnname
of
current
processed
formElement
>
'
</code>
Stores
======
*
Get submitted POST variables by
[src] $values = $this->store->getStore(STORE_CLIENT)
Primary Table
=============
*
For the primary table all informations are available in STORE_TABLE_DEFAULT and STORE_TABLE_COLUMN_TYPES.
*
Get all columns of the primary table by
[src] array_keys($this->getStore(STORE_TABLE_COLUMN_TYPES))
*
Get the recent record in STORE_RECORD and the parent record (multiforms) in STORE_PARENT_RECORD.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment