All find() methods returns a query object. All query objects have a first() and toArray() method. If you want to see the results of your find you can do:
$pages = $this->Pages->find('treeList')->toArray(); On Friday, July 11, 2014 10:28:58 AM UTC+2, Michael Houghton wrote: > > Hey Jose > > Sure thing. This seems like a similar issue that I had with: > > $this->Models->findByField($name)->first(); > > If you recall, I missed the -> first() and was trying: > > $this->Models->findByField($name); > > Which just gives a whole lot of data on the schema. > > With the tree behavior, I am calling: > > $pages = $this->Pages->find('treeList'); > pr($pages); die; > > But again, it is giving me a lot of schema stuff. I checked the docs, but > it only mentions what I did - how to a build the list here - in 2.x we > would do: > > $this->Page->generateTreeList(); > > I want to build the same list in 3.0! > > Do you have any idea what I could be missing? > > Thanks again for your help - I am slowly getting my head around this! > > On Friday, July 11, 2014 9:18:08 AM UTC+1, José Lorenzo wrote: >> >> Not sure what you mean with " It isn't returning a list at all." Can you >> explain? >> >> -- 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. For more options, visit https://groups.google.com/d/optout.