Feature #12723
Implement two hooks to modify the elements of a row (complete patch & documentation supplied)
| Status: | Resolved | Start date: | 2011-02-02 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | 2011-03-10 | |
| Assignee: | Dirk Wildt | % Done: | 100% |
|
| Category: | PHP | Spent time: | - | |
| Target version: | 3.6.2 | Estimated time: | 2.00 hours | |
| Votes: | 0 |
Description
2011-02-02 Martin Bless <martin@mbless.de>
README.txt
browser version 3.6.1 (svn, Revision 42662)
Feature Request: Please implement the following in trunk!
ENGLISH:
These files implement two new hooks in the extension "browser".
When "browser" is preparing a row it will use the function "class.tx_browser_pi1_template->tmplRows(...)". The hooks provide access to the data once BEFORE any Typoscript processing is done and a second time AFTERWARDS. Manipulating the data will change the browser's further processing and output. This make it possible to consider field spanning business logic and reformulate the fields.
Only the file "class.tx_browser_pi1_template.php" has changed. Its provided here in whole and as DIFF file against Revision 42662.
Additionally the extension "browser_tut_hooks_en" has been supplemented. It is shown how the new hooks are being used. The documentation "manual.sxw" and "manual.pdf" of "browser_tut_hooks_en" have been adapted as well to cover the new features. Some of the existing english phrases have been modified as well.
Status:
I'm using the hooks in a real life scenario and didn't encounter any problems up to now.
The End Of This Documentation.
GERMAN:
Diese Dateien implementieren zwei neue Hooks in der Extension "browser".
Wenn der "browser" eine Zeile ausgibt, sei es in der Listen- oder in der Einzelansicht, kommt die Funktion "class.tx_browser_pi1_template->tmplRows(...)" zum Tragen. Die Hooks gewähren Zugriff auf die auszugebenden Daten. Eine Manipulation der Daten beinflusst die Ausgabe des browser's! Der erste Hook wird aufgerufen, BEVOR die Typoscript-Verarbeitung stattgefunden hat, der zweite DANACH. Damit ist es also möglich, Feld-übergreifende Logik bei der Formulierung der Ausgabedaten zu berücksichtigen.
Geändert werden muss nur die Datei "class.tx_browser_pi1_template.php. Sie ist in diesem Archiv enthalten. Besser ist es jedoch, die beiliegende DIFF-Datei zu verwenden.
Außerdem liegt eine angepasste Version der Extension "browser_tut_hooks_en" bei. Die Verwendung der Hooks ist dort demonstriert. Ebenfalls ergänzt sind ich "manual.sxw" und "manual.pdf" in "browser_tut_hooks_en". Weiterhin wurden dort einige englische Formulierungen geändert.
Status:
Die Hooks sind bei mir bereits im Real-Live-Einsatz und funktionieren gut. Probleme habe ich bislang nicht festgestellt.
Ende der Doku.
History
Updated by Dirk Wildt over 2 years ago
- Target version changed from 3.6.1 to 3.6.2
Updated by Martin Bless over 2 years ago
- File browser-two-new-hooks-3.6.1-r43052.zip added
ENGLISH:
Hello Dirk, thanks for the new version 3.6.1. I ported my changes to that version and otherwise changed as little as possible. Now its easy to understand what's changing. To help understanding I added some blank lines. Appended is the modified "class.tx_browser_pi1_template.php" (3.6.1) and additionally the diff against 3.6.1. ATTENTION: The modified example extension "browser_tut_hooks_en" is still important. It is part of the first upload in this thread.
GERMAN:
Hallo Dirk, besten Dank für die neue Version 3.6.1. Ich habe meine Änderungen dahinein übertragen und ansonsten sowenig wie möglich geändert. Nur alles mit Leerzeilen etwas abgesetzt. So ist es auch viel besser verständlich, denke ich. Beiliegend also "class.tx_browser_pi1_template.php" (3.6.1), einmal komplett und einmal als Diff. ACHTUNG: Aus dem zuerst hochgeladenen Archiv ist unverändert die "browser_tut_hooks_en" wichtig!
Updated by Dirk Wildt over 2 years ago
- Status changed from New to Needs Feedback
- Assignee set to Dirk Wildt
Dear Martin,
Thanks for your hooks and the ready code.
I like to integrate your hooks, but I have a question in principle.
Would you be so nice, to call me (I missed your phone number) from monday, 7th of february. Please let a note on my answering machine. I will call back.
Kind regards
Dirk
Updated by Dirk Wildt about 2 years ago
- Due date set to 2011-03-10
- Category set to PHP
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
- Estimated time set to 2.00