|
I was playing around with JsonView and the PaginatorHelper and noticed that the data returned by $this->Paginator->next() was different to the one returned by the same method when using the normal (HTML) view.
Digging into the code, I found out that the JsonView doesn't trigger the beforeRender callback. Why is that? is this a bug or is it meant to be like that by design? Specifically speaking, the render method of the View class triggers the callbacks like this: 464 $this->getEventManager()->dispatch(new CakeEvent('View.beforeRender', $this, array($viewFileName))); Whereas JsonView->render() will just return the $content without triggering the callbacks. I'm on version 2.1.3, btw.
-- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. |
|
[Tumbleweed]
:P
-- On Monday, August 13, 2012 11:28:53 AM UTC-5, Lucho Molina wrote: I was playing around with JsonView and the PaginatorHelper and noticed that the data returned by $this->Paginator->next() was different to the one returned by the same method when using the normal (HTML) view. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. |
|
https://github.com/cakephp/cakephp/pull/777
Keep an eye on this one id say :) On Wednesday, August 15, 2012 12:57:53 AM UTC+2, Lucho Molina wrote: [Tumbleweed]-- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. |
| Powered by Nabble | Edit this page |
