alvin567 Posted May 28, 2012 Share Posted May 28, 2012 Hi everyone,what is the difference between beforerender and beforefilter? Quote Link to comment https://forums.phpfreaks.com/topic/263252-cakephp-difference-between-beforerender-and-beforefilter/ Share on other sites More sharing options...
thehippy Posted May 29, 2012 Share Posted May 29, 2012 From the CakePHP Cookbook Controller::beforeFilter() This function is executed before every action in the controller. It’s a handy place to check for an active session or inspect user permissions. Controller::beforeRender() Called after controller action logic, but before the view is rendered. This callback is not used often, but may be needed if you are calling render() manually before the end of a given action. Quote Link to comment https://forums.phpfreaks.com/topic/263252-cakephp-difference-between-beforerender-and-beforefilter/#findComment-1349459 Share on other sites More sharing options...
alvin567 Posted May 30, 2012 Author Share Posted May 30, 2012 so does it mean that afterfind when find condition will be executed? Quote Link to comment https://forums.phpfreaks.com/topic/263252-cakephp-difference-between-beforerender-and-beforefilter/#findComment-1349735 Share on other sites More sharing options...
thehippy Posted May 30, 2012 Share Posted May 30, 2012 http://book.cakephp.org/2.0/en/models/callback-methods.html#afterfind Quote Link to comment https://forums.phpfreaks.com/topic/263252-cakephp-difference-between-beforerender-and-beforefilter/#findComment-1349741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.