How can I access method of another controller?
There is controller:
<?php
class AdminUsersController extends AppController {
-------some functions----
function admin_user_list()
{
$results = $this->AdminUser->findAll('ORDER BY AdminUser.position');
return $results;
}
}
?>
and second controller is:
<?php
class MainMenusController extends AppController {
function admin_add() {
//this is wrong! why? I need admin_user_list() function from
AdminUsersController on this place.
// It's showing me this error every time: "You are seeing this error
because the private class
// method admin_user_list should not be accessed directly"
$administrator =$this->requestAction('/admin_users/admin_user_list');
----some code-----
}
}
?>
How can I solve this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---