How to inherit / extend a content class
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 site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home