Re: Controller without model/table possible?

2008-02-05 Thread Rgarg

you can use any number of existing models like this

App::import('Model', 'Product');
$tmpProduct = new Product();
$tmpProduct->find();


--~--~-~--~~~---~--~~
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: Controller without model/table possible?

2008-02-05 Thread Tim Wild

Thanks Daniel, it's so obvious once it's been pointed out!

Daniel Hofstetter wrote:
> Hi Tim,
>
>   
>> Is it possible to have a controller that doesn't map directly to a
>> model or database table? I want an admin section for my website where
>> I can edit users and other models, it'll hook into existing models
>> rather than having its own.
>> 
>
> Add var $uses = array(); to your controller.
>
> --
> Daniel Hofstetter
> http://cakebaker.42dh.com
> >
>   


--~--~-~--~~~---~--~~
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: Controller without model/table possible?

2008-02-05 Thread Daniel Hofstetter

Hi Tim,

> Is it possible to have a controller that doesn't map directly to a
> model or database table? I want an admin section for my website where
> I can edit users and other models, it'll hook into existing models
> rather than having its own.

Add var $uses = array(); to your controller.

--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---