Re: anything similar to acts_as_tree in Rails

2007-01-21 Thread CraZyLeGs

There is a ticket in the trac about rewriting findAllThreaded to use
the modified preorder tree algo.

Maybe some courageous mind will submit a patch.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-20 Thread river_jetties

any update on this. I just dl'd the 1.2 nightly build and don't see
anything in the behaviors folder.

Let me know if I'm missing anything.

I'd really like to do something in Cake if I can get this piece of
functionality iron'd out.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-20 Thread georgeL

the upcoming behaviors, just gives you the hook to the
acts_as_whatever.
I liked the tree behavior in rails but cake has only limited support
for it now.

you can now use the function findAllThreaded which returns a nested
array of a self joined table using parent_id´s.

but this function needs to always grab all records if you are having a
structure nested more than one level deep. So if you have f.ex.
categories nested 3-4 levels deep, you are definitly running into
problems and have to code the traversal/iteration to get f.ex. the
parent/parent  or all childs of the second level yourself.

I´m currently building a product catalog with a simple wishlist. the
products are joined to themselfes to realize product groups/variants of
a product and the categories are nested 3-4 levels deep.

to make it easier to get objects from inside a tree and check where
they are in a tree i´ll probably switch to a modified preorder tree.
there is a darn good tutorial in php on :
http://www.sitepoint.com/article/hierarchical-data-database/2

and you could also take a look at the ocean cms in the cakeforge which
has adaped this. I´m going to check this out and will see if this
suits my needs


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



anything similar to acts_as_tree in Rails

2007-01-07 Thread river_jetties


I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 
'acts_as_tree' in rails.


-j


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-07 Thread Felix Geisendörfer

I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails. 
CakePHP 1.2 has a similar functionality named Behaviors. However it's 
not officially been released yet (only a developer release).


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


river_jetties wrote:


I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails.

-j






--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-07 Thread Olivier Percebois-Garve

Would it make sense to go after rails's documentation to get an idea of how
these new things in 1.2 are functioning ?

olivvv

Felix Geisendörfer wrote:

I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails. 
CakePHP 1.2 has a similar functionality named Behaviors. However it's 
not officially been released yet (only a developer release).


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


river_jetties wrote:


I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails.

-j











--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-07 Thread Felix Geisendörfer
 Would it make sense to go after rails's documentation to get an idea 
of how

these new things in 1.2 are functioning ?
Probably not. But maybe I can get you some sample code at some point if 
I find it.


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Olivier Percebois-Garve wrote:
Would it make sense to go after rails's documentation to get an idea 
of how

these new things in 1.2 are functioning ?

olivvv

Felix Geisendörfer wrote:

I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails. 
CakePHP 1.2 has a similar functionality named Behaviors. However it's 
not officially been released yet (only a developer release).


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


river_jetties wrote:


I'm thinking of doing a project in cake and would like to know if there
is a model convention similar to 'acts_as_tree' in rails.

-j














--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: anything similar to acts_as_tree in Rails

2007-01-07 Thread Felix Geisendörfer
Cool. behaviors and especially act_as_tree look interesting but I 
still don't grasp it really.
Well to make a long story short, behaviors basically allow you to add 
new *methods* to a Model that has a certain behavior attached to it, as 
well as getting all the beforeFind/afterFind/etc. callbacks.


It's almost like inheritance, but better - it allows for multiple 
parents ; ).


-- Felix
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Olivier Percebois-Garve wrote:
Cool. behaviors and especially act_as_tree look interesting but I 
still don't grasp it really.



Felix Geisendörfer wrote:
Would it make sense to go after rails's documentation to get an idea 
of how

these new things in 1.2 are functioning ?
Probably not. But maybe I can get you some sample code at some point 
if I find it.


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Olivier Percebois-Garve wrote:
Would it make sense to go after rails's documentation to get an idea 
of how

these new things in 1.2 are functioning ?

olivvv

Felix Geisendörfer wrote:
I'm thinking of doing a project in cake and would like to know if 
there
is a model convention similar to 'acts_as_tree' in rails. 
CakePHP 1.2 has a similar functionality named Behaviors. However 
it's not officially been released yet (only a developer release).


-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


river_jetties wrote:


I'm thinking of doing a project in cake and would like to know if 
there

is a model convention similar to 'acts_as_tree' in rails.

-j





















--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---