This is because, in order to properly separate MVC * in Cake, you do not have to access the model from the view. The only part of accessing the data should be the Controller (via the Model), which transfers it to the View, which simply displays the data.
Thus, using the beforeFiltercallback globally AppControllerto set()probably the best choice.
In emergency situations, you can always access anything from anywhere by downloading an instance of the desired class using ClassRegistry::init, but you really have to "t.
* , " MVC" , . , , . Cake, Cake MVC, Cake - .