# |
Sep 13th 2009, 14:32 |
ionas82 |
but it makes sense the way it is as well |
# |
Sep 13th 2009, 14:32 |
ionas82 |
or Controller |
# |
Sep 13th 2009, 14:32 |
ionas82 |
afterFilter afterAction |
# |
Sep 13th 2009, 14:32 |
ionas82 |
beforeRender = beforeView |
# |
Sep 13th 2009, 14:32 |
ionas82 |
beforeFilter you could "name" beforeAction |
# |
Sep 13th 2009, 14:32 |
ionas82 |
the naming is pretty self explaining |
# |
Sep 13th 2009, 14:31 |
ionas82 |
there you see the callbacks as well |
# |
Sep 13th 2009, 14:31 |
ionas82 |
http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf |
# |
Sep 13th 2009, 14:30 |
ionas82 |
I think yes |
# |
Sep 13th 2009, 14:30 |
ionas82 |
NoReGreT, http://book.cakephp.org/view/21/A-Typical-CakePHP-Request |
# |
Sep 13th 2009, 14:29 |
NoReGreT |
ionas82: you mean the blue lines which are callbacks? |
# |
Sep 13th 2009, 14:29 |
jway |
thanks a lot |
# |
Sep 13th 2009, 14:29 |
ionas82 |
see book "contain" or "contains" |
# |
Sep 13th 2009, 14:29 |
ionas82 |
jway, I'd go for containable for now |
# |
Sep 13th 2009, 14:29 |
NoReGreT |
ionas82: yeah, but no mentioning of beforeFilter |
# |
Sep 13th 2009, 14:29 |
jway |
but what about the right way, should I just look up linkable behaviour? |
# |
Sep 13th 2009, 14:28 |
jway |
aha |
# |
Sep 13th 2009, 14:28 |
ionas82 |
[21:48] <ionas82> http://book.cakephp.org/img/typical-cake-request.gif |
# |
Sep 13th 2009, 14:28 |
ionas82 |
did you see the graphic |
# |
Sep 13th 2009, 14:28 |
ionas82 |
NoReGreT, correct |
# |
Sep 13th 2009, 14:28 |
ionas82 |
if your assocs are right then, it would work |
# |
Sep 13th 2009, 14:28 |
jway |
Tampie, yes I added belongsTo in the Comment model |
# |
Sep 13th 2009, 14:28 |
ionas82 |
the "wrong" way $this->Model->recursive=2; |
# |
Sep 13th 2009, 14:28 |
NoReGreT |
ionas82: so when the action is called, beforeFilter is processed then does the action ? |
# |
Sep 13th 2009, 14:28 |
ionas82 |
if you want to walk deep through model associations |
# |
Sep 13th 2009, 14:27 |
ionas82 |
jway if you want to do it "right" use containable or linkable behaviors |
# |
Sep 13th 2009, 14:27 |
Tampie |
jway did you use belongsTo? |
# |
Sep 13th 2009, 14:27 |
thun |
if i just Lead->save($lead) it saves alot but not all the associtations |
# |
Sep 13th 2009, 14:27 |
thun |
If I load a model Lead which has a bunch of relationships. I set the recursive to 1 and get all the HABTM results. if i load it into a var $lead can I take that var and duplicate the entire entry including all the HABTM entries |
# |
Sep 13th 2009, 14:27 |
jway |
but why is the user information not added to the comment blocks? |
# |
Sep 13th 2009, 14:27 |
jway |
Article->find('id=1') gives me an article object WITH all comments associated, as I used $hasMany relationship |
# |
Sep 13th 2009, 14:26 |
jway |
and it works when calling Comment->findAll() |
# |
Sep 13th 2009, 14:26 |
ionas82 |
markstory, any tips on saveAll and validation, seems not to tigger form->errors() ? |
# |
Sep 13th 2009, 14:25 |
ionas82 |
works for sure |
# |
Sep 13th 2009, 14:25 |
ionas82 |
http://bin.cakephp.org/view/586626198 |
# |
Sep 13th 2009, 14:24 |
ionas82 |
jway, sure? |
# |
Sep 13th 2009, 14:24 |
jway |
ionas82, well you can use both but it makes no difference |
# |
Sep 13th 2009, 14:23 |
ionas82 |
~bin |
# |
Sep 13th 2009, 14:23 |
ionas82 |
y |
# |
Sep 13th 2009, 14:23 |
ionas82 |
jway those variables take array usualle |
# |
Sep 13th 2009, 14:22 |
ionas82 |
http://book.cakephp.org/img/typical-cake-request.gif |