Monday, July 27, 2009

Re: How to inheirt form other controllers?

On Mon, Jul 27, 2009 at 10:32 AM, Michael Gaiser<mjgaiser@gmail.com> wrote:
> When I try that, I end up with this error
>
> Fatal error: Class 'LocationController' not found in
> C:\wamp\www\theinconnu\app\controllers\locationmanager_controller.php on
> line 6

You might have to include the path:

http://api.cakephp.org/class/app#method-Appimport

> So for the parent controller name, do I use 'Location' or
> 'LocationController'?

"Location" would be the name of the model. If your class file says
"class LocationController ..." at the top, that's the name to use.
Although it really should be LocationsController.

But I wonder if you'd be better off without importing one controlller
into another. You began by mentioning something called UserAdmin,
which suggests that you could just stick with Users and admin routing.
Where does this LocationController fit in?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: