Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
88f7e3a6
Commit
88f7e3a6
authored
9 years ago
by
Carsten Rose
Browse files
Options
Downloads
Patches
Plain Diff
Coding.md: enhanced
parent
b47ab4e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CODING.md
+51
-16
51 additions, 16 deletions
CODING.md
with
51 additions
and
16 deletions
CODING.md
+
51
−
16
View file @
88f7e3a6
...
...
@@ -4,29 +4,56 @@ 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 parameter 'form' has to be allowed in 'Permit URL Parameter'
*
The active formname is stored in $this->store->setVar(SYSTEM_FORM, $formName, STORE_SYSTEM);
*
Class QuickFormQuery is the main entry point called by:
*
T3 Extension 'QFQ': called once per tt_content-record. 'bodytext' will be transferred to class QuickFormQuery.
*
The 'bodytext' contains:
*
Report definiton: 10.sql=SELECT ...
*
Form definition (explizit): form=Person
*
<Empty>
: do nothing
*
api/save.php: wrapper to receive AJAX post request and instantiate QuickFormQuery.
*
api/load.php: not implemented yet.
*
Wrapper to receive AJAX get requests.
*
delivers data for jqw grid
*
delivers data for typeahed fields
*
delivers data for select list
*
delivers data for depended (user select/unselect former elements) form elements
LOAD
----
*
When qfq starts,
*
(Form) Looking for a formname at:
1.
Typo3 Bodytext Element,
2.
For the 'SIP' ($_GET['s'])
3.
$_GET variables 'form' and 'r' (=recordId) - the parameter 'form' has to be allowed in 'Permit URL Parameter' of
the specified form. This means: load the form to check, if it is allowed to load the form!?
*
If a formname is found, the search stops and the specified form will be processed.
*
(Report)
*
Process all
<number>
.[
<number.>
].sql statements
*
Access code variables:
*
active/valid formname: [$this->store->setVar(SYSTEM_FORM, $formName, STORE_SYSTEM);]
*
SIP: [$this->store->getVar('form', STORE_SIP)]
*
All parameters from active SIP: [$this->store->getStore(STORE_SIP)]
*
Check Contstants.php for known Store members
*
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 Form specificaton (table form) will be evaluated
direct
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
SAVE
----
*
Via wrapper api/save.php
*
SID must be supplied via FORM POST
*
The SID supplies the
<formname>
and the
<redordid>
*
form.render: plain/table/bootstrap
*
Client will handle the response of save.php.
*
Optional redirection initiated by client.
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)
...
...
@@ -75,4 +102,12 @@ Typo3
*
Verzeichnisstruktur Extension: https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/FilesAndLocations/Index.html
*
http://api.typo3.org/
*
http://api.typo3.org/typo3cms/62/html/index.html
*
https://docs.typo3.org/typo3cms/CoreApiReference/Introduction/Index.html
\ No newline at end of file
*
https://docs.typo3.org/typo3cms/CoreApiReference/Introduction/Index.html
SIP
===
Page loaded: www.example.com?index.php&id=start&s=badcaffee1234&type=2&L=3, with $_SESSION['badcaffee1234'] => 'form=Person&r=1'
*
$_SESSION[$sip] =>
<urlparam>
>> $_SESSION['badcaffee1234'] => 'form=Person&r=1'
*
$_SESSION[$urlparam] =>
<sip>
>> $_SESSION['form=Person&r=1'] => 'badcaffee1234'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment