Thanks for the reply Sam.   I don't think I will have shared
functionality per se, but I am trying to avoid putting all of the
fields that are in the content table on each of the other tables /
classes.   I was thinking it would be best to use a single base class
& db table to store all of the shared information about any content
record in the system.

Based on the two links, I believe the second one is exactly what I am
looking for.   I'm just not sure how to implement it.


Thanks again.,

On Feb 10, 8:21 am, Sam Sherlock <sam.sherl...@gmail.com> wrote:
> what functionality does the content class give the classes that extend it?
>
> I think you want to have these reusable parts within a component
> and use behaviours on the corresponding models
>
> but you can read Neil Crook's answer 
> herehttp://stackoverflow.com/questions/1875831/cakephp-abstracting-appcon...
> also 
> readhttp://cakephp.1045679.n5.nabble.com/Extending-controllers-td1261319....
>
>  - S
>
> On 9 February 2011 20:28, mfrday <palsp...@gmail.com> wrote:
>
>
>
> > Hi there - I am somewhat of a newbie to cake, and have what I believe
> > is a simple question.     I have the following content entities being
> > submitted to our system:   bookmarks, messages, and posts.   All of
> > these entities have a set of underlying similar fields /
> > relationships.   What I would like to do is create a base class
> > (content) that can be inherited by all of these other content
> > entities.
>
> > Here is a sample of the data elements:
>
> > Contents Class:
> > - id
> > - user_id
> > - target_id
> > - category_id
> > - created
> > - modified
>
> > Bookmarks Class (inherits from Content)
> > - id
> > - content_id
> > - url
> > - message
>
> > Posts Class  (inherits from Content)
> > - id
> > - content_id
> > - name
> > - picture
>
> > etc....
>
> > My question is how do I go about doing this ?   Is the Content class a
> > component ?   Do I need to create a regular view / controller for it
> > as well ?
>
> > Any direction that could be given would be extremely helpful.
>
> > Regards,
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to