[TYPO3-core] RFC: Another hook request for db_list (#6738)
    Bernhard Kraft 
    kraftb at kraftb.at
       
    Tue Nov 20 15:00:06 CET 2007
    
    
  
Ingo Renner wrote:
> Bernhard Kraft wrote:
 >> [...]
>> I followed the style of Ingmar to create an interface class.
> 
> I know Ingo and Ingmar is very similar ;-)
Sorry for that. I always then to call one of you by the name of the other :)
> * please rename t3lib_localRecordList_makeClip to 
> t3lib_localRecordList_makeClipHook and also the file accordingly, this 
> will make sure that one can find them easier as I hope to introduce more 
> interfaces not only for hooks where it makes sense.
Ok ... so "objection #1" is to add the word "Hook".
> * here both mehtods concern one task (do they really do?) so that I'd 
> put them into a single interface
But then I can't name the file (and interface class) either "..._makeClipHook"
nor "..._makeControlHook". Cause it contains one method for each.
Proposal:
---------
All hooks for one class go into an interface/file named:
##CLASSNAME##_Hook
So this would be: "t3lib_localRecordList_Hook" in this case. I would just
add both new hook methods to the already existing interface class/file
you created - is that ok for you Ingo ?
Additional:
-----------
And eventually we should leave the "t3lib_" away. As the original class is
called just "localRecordList" - i know this conflicts with the usual T3
naming scheme. So it is dependend on what you think: wheter we should keep
the current "invalid" naming of those ".inc" classes or try to change the
slowly to "conventional" T3 naming scheme.
> * $cells['view_big'] => $cells['viewBig'], $cells['move_up'] => 
> $cells['moveUp'], $cells['move_down'] => $cells['moveDown'], ...
Ok.
> * the second parameter in throw new Exception should be the current unix 
> timestamp at the time you wrote that time (roughly) This will make sure 
> to easily find the place where the exception was thrown (apart from the 
> stack trace) as it seems to be unlikely that two devs will create a hook 
> at the exact same second. The timestamp you used is from Thursday ...
Ok. Didn't know that - and wondered what that number is. I hoped it wasn't
a consecutive number for each exception :)
> * wouldn't it be better/cleaner/easier to understand if the methods 
> wouldn't change the $cells array through a reference and instead return 
> a new one (or in case they do not implement both methods they'd just 
> return the original without change)
Ok.
> * when making it possible to change these icons/actions I'd like to also 
> see another method:
> 
> There's an extension from Michael Feinbier that adds such an action to 
> ve_guestbook comments to (un)mark them as spam and report them to some 
> webservice by using an xclass. Now clicking each spam comment is a 
> tedious task. When switching to clipboard 1 f.e. you get checkboxes to 
> mark multiple records so that you can copy them all at a single click on 
> the copy icon on top of the table.
So for the icons valid for a complete table. Ok. This belongs to this patch.
The other requested hook from Tapio for icons in t3lib_tceforms at the top
(Save, Save&Exit, Exit, Delete, etc...) will be in an extra patch request/diff
Patch will be ready in one or two hours ...
greets,
Bernhard
    
    
More information about the TYPO3-team-core
mailing list