[TYPO3-core] make class.t3lib_db.php usable for backend modules

Holzinger Franz franz at fholzinger.com
Wed Nov 30 23:24:55 CET 2005

Hello Michael,

>We use this mailing list for a last stop before things enter the Core CVS.
>You can submit your patches, write some words why they are needed, and wait
>for other peoples go.
>However the mailing list is _not_ meant to be another discussion place - we
>already have typo3-dev for this. It's just for the stuff that is ready to
>be used.
I did not know that, sorry.

>>I am currently developing the Graytree Library which is good for
>>displaying a category tree in the backend and frontend.
>>On the right side of this tree the same list like in the LIST module
>>should get displayed. However I could not use the class.t3lib_db.php to
>>do this but had to copy most of its code, because the BACKPATH variable
>>is not used. And the class file has its own creation parts so nobody can
>>derive a class from it.
>I have some comments here, but the discussion should follow in typo3-dev!
>- The name "graytree" makes me think of Volker Graubaum. I'm sorry to say
>  but I dislike the idea to make TYPO3 class names a hall of fame, so please
>  change it.
I cannot change this by myself, sorry, it has been payed work. You 
should discuss this with Volker Graubaum and I am sure he would agree to 
a change of its name. I do not think this library will make him more 
famous than he already is because of the Commerce extension. The name 
derives from the tree library, because it is an enhancement to it. And 
it is an abstract library, so the name really makes sense here. I have 
proposed this extension name. The extension has been created to his 
plans and imaginations. It has not been coded into the Commerce 
extension only because it could be used by the TYPO3 community for 
anything else. No becoming famous was intended or necessary. But if you 
have a better name suggestion, ...

>- Generally: What does t3lib_db have to do with the list module?
This list module should not exist at all. However it has not been 
possible to use the t3lib_db because its class is instantiated directly 
in the file. And the other reasons are: the paths to the icons and 
scripts could not get found and there are no default values. And the db 
list only displays the db records by the page id and there is no 
possiblity to list them by categories or even filter the records by 
something else.
I would also need this in the future for other extensions in order to 
reuse the code for displaying the same database lists as in the LIST 
module but in another backend module.

>>And what I also need is to pass paramters there. E.g.
>>        // Graytree Anfang
>>        $this->graytree = t3lib_div::_GP('graytree');
>>        if ($this->graytree) {
>>            $this->table = key ($this->graytree);
>>            $this->valueArray = current($this->graytree);
>>        }
>>The name can be different of course. Which name do you prefer?
>Ah, I see. I don't have a suggestion, but please change it.
This is intended to be changed anyways when it comes into TYPO3. E.g. 

>>I hope you agree that I can start to bring the changes from Graytree
>>record list view into TYPO3.
>I still don't see the sense in it. Maybe you can explain?
The Graytree library gives you the possibility to display a categorie 
tree and several different database tables as leaves on the left side. 
If you click on a category, which corresponds to a page on the page 
tree, then on the right side the records of this category should be listed.
And when you create a new record from the list, then in the backend edit 
form the category should be already there as the default value. So the 
user does not need to select the category again. Or if you create a new 
product, then this would also have the category field already set by a 
default value.

So the intention is to let the graytree library become more and more 
obsolete and be incorporated into TYPO3 in order that other extension 
authors can use this better.


More information about the TYPO3-team-core mailing list