[TYPO3-core] RFC #13379: Sprite Icon API
Sebastian Kurfürst
sebastian at typo3.org
Wed Mar 24 15:44:37 CET 2010
Hey everybody,
first off -- thanks for the great work you've already been investing in
the Sprite Icon API. I have just reviewed it together with Benni, and
we'd have some suggestions how to structure the API a bit better.
They are summarized in three pictures:
http://skitch.com/skurfuerst/n5t7p/window
http://skitch.com/skurfuerst/n5t7x/window
http://skitch.com/skurfuerst/n5t7w/window
In the bubbles, you find the arguments of the methods, and a little
explanation.
I'd like to explain some possible program flows based on the diagrams:
1) getSpriteIcon
- for every overlay:
- call getSpriteIconCssClasses
- call buildHtmlIconTag
- for the base icon:
- call getSpriteIconCssClasses
- call buildHtmlIconTag
2) getSpriteIconForFile
... only accepts the file extension, with the special file extensions
"folder" and "mount"
- calls the method "file no overlay" (which still has to be named
properly)
- resolves the appropriate CSS class
- call and return getSpriteIconCssClasses
- call buildHtmlIconTag
3) getSpriteIconForRecord
... analogous to the one above, just taking into accounts overlays as well.
I'm curious about your feedback :-)
Unfortunately I won't have time to implement this API; but maybe some of
you have? (I know that for instance Steffen Gebert wants to look on this
again ;) ) -- I'd be cool if you'd find the time to implement that.
Greets,
Sebastian
More information about the TYPO3-team-core
mailing list