Have you got an example of that? On 24 May 2013, at 01:09, lowpass <zijn.digi...@gmail.com> wrote:
> Apply the array to the $paginate class var, not the method. Basically, you > can declare the $paginate array as a class var, then add to or override any > part of it from within an action. > > > On Thu, May 23, 2013 at 7:12 PM, Larry Lutz <lut...@swbell.net> wrote: > I'm trying to achieve the fat model/skinny controller mantra in CakePHP 2.7. > In that scenario, the model should control the data, and that means moving > the finds out of the controllers and into the models. However, at least with > the view and admin_view actions, one needs the data paginated. > > The problem starts there. It's easy enough to do a $this->find('all') in the > model to get the data, along with any conditions, contains, etc. However that > produces an array. Paginator->paginate(), as far as I can tell won't work in > the model; it's a component that only works in a controller. Yet, if I take > the array produced in the model into the controller and try to pass it on to > Paginator->paginate(), it fails because paginate won't accept an array. > > In terms of trying to achieve the fat model/skinny controller goal, what am I > missing here. How can I achieve a paginated result while still having the > model (properly) do the work of managing and finding the data? > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.