On Sep 15, 1:24 am, millZ <[EMAIL PROTECTED]> wrote:
> Hello,
>
> how is it possible to call functions of a Controller
> (EventsController) in another Controller (VisitsController)?
>
> The models are connected with
> visits:belongsto Events
> events: hasMany Visits
>
> I've tried to call "$this->Visit->Event->isFriendEvent($eID)", but
> this ends with an error, because of an acces to the models.
> So what is the way to call the function "isFriendEvent" (defined in
> Eventscontroller) in VisitsController - i need it there.
You could always.....
move the method to the model, which is probably where it should be.
You can then call it from either controller.
hth,
AD
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---