hi all,
i have a deep model association
handle by the containable behaviour:
ModelD hasMany ModelDF
ModelD belonsTo ModelDS
ModelDF belongsTo ModelD, ModelDSF
ModelDS hasMany ModelD, ModelDSF
var $contain = array(
'DS' => array(
'DSF' => array(
'DF
ok, i'm going to try.
thanks a lot!
On Sep 30, 5:46 pm, brian wrote:
> On Wed, Sep 30, 2009 at 11:01 AM, lorenx wrote:
>
> > do i have to create it or to copy cake/libs/controller/
> > app_controller.php so that cakephp will read mine from now on?
>
> Yeah, copy th
e doing.
>
> // lundvall
>
> On 30 Sep, 13:16, lorenx wrote:
>
> > mmm,
> > i have just these two:
>
> > cake/libs/controller/app_controller.php
> > cake/console/libs/templates/skel/app_controller.php
>
> > On Sep 30, 11:41 am, "rich...@hom
php
>
> class AppController extends Controller {
>
> var $helpers = array("Html", "Form", "Javascript");
>
> }
>
> On Sep 30, 9:17 am, lorenx wrote:
>
>
>
> > m, ok...
> > i raised the issue just because the cookboo
m, ok...
i raised the issue just because the cookbook says "not to edit files
in cake/ folder"...
thanks.
On Sep 30, 2:12 am, brian wrote:
> On Tue, Sep 29, 2009 at 5:07 PM, lorenx wrote:
>
> > sure but...
> > is there a way to do it in the app/ area?
>
> Do
i'm sorry for my perseverance but...
the FormHelper magic is really limited just to one-level recursion?
On Sep 26, 8:52 pm, lorenx wrote:
> me again...
>
> i found the following link (i'm not using the $uses controller
> attribute) and i did some tests:https://trac.c
var $helpers = array('Javascript');
>
> }
>
> // lundvall
>
> On 29 Sep, 19:57, lorenx wrote:
>
>
>
> > hi all,
> > i'm wondering one thing:
> > i understand the choise to call helpers only when needed but... if i
> > want to include
hi all,
i'm wondering one thing:
i understand the choise to call helpers only when needed but... if i
want to include a javascript file in the default.ctp (the common
layout used everywhere), i have to call the javascript helper in every
controller of my application?
thanks.
--~--~-~--~--
On Sep 25, 10:00 pm, brian wrote:
> Do you mean that you only want that one model to implement it? Yes,
> you can do that. The syntax is exactly the same as with AppModel:
>
> var $actsAs = array('Containable');
>
> or (PHP5 only)
>
> public $actsAs = array('Co
father['TestChild'] as $subkey => $child):
echo
$form->input('TestFather.'.$key.'.TestChild.'.$subkey.'.name');
echo $form->input('TestFather['.$key.'][TestChild]['.$subkey.']
[name]');
endforeach
ok, i follow your advice and i stop here.
thank a lot, really!
On Sep 26, 4:45 pm, brian wrote:
> On Sat, Sep 26, 2009 at 10:36 AM, lorenx wrote:
>
> > ok, just to make sure we understand each other :)
>
> > the following is not correct:
>
> > class ModelA ext
awesome, cause i now
have a ModelB property set in the ModelA... correct me if i am wrong)
thanks again!
On Sep 26, 4:03 pm, brian wrote:
> On Sat, Sep 26, 2009 at 9:38 AM, lorenx wrote:
>
> > sorry...
>
> > and if i need something like this
>
> > '
hi all, again.
i have a $form->data populated with models deeply related and i'm not
able to take full advantage of the formhelper magic.
in the last part of the form i use foreach to cycle on the deep models
and i refer to them with:
'ModelA.ModelB.'.$i.'.ModelC.0.field'
but nothing happens.
i
sorry but... the FormHelper magic is limited just to one-level
recursion?
On Sep 26, 12:34 pm, lorenx wrote:
> hi all, again.
>
> i have a $form->data populated with models deeply related and i'm not
> able to take full advantage of the formhelper magic.
>
> in the l
),
'HtmlInputType',
'order' => $this->OtherModel->order
)
)
)
is that the correct way to refer to the OtherModel property or not...
On Sep 26, 3:32 pm, lorenx wrote:
> ...and s
this->YourModel->contain
>
>
>
> On Sat, Sep 26, 2009 at 5:50 AM, lorenx wrote:
>
> > sorry... i didn't explain it well at all! :P
> > i meant this: if it is possible to set in the model file the "contain"
> > array with all the details;
>
&
hi all.
is it possible to set the containable behaviour of a model in its
model file?
just to set it once, staticly... maybe with the ability to change it
on the fly when needed...
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
ok, thank you very much!
On Sep 24, 1:58 pm, Bert Van den Brande wrote:
> If I understand you question correctly I think you're right :)
>
>
>
> On Thu, Sep 24, 2009 at 1:27 PM, lorenx wrote:
>
> > perfect, thanks!
>
> > just one little question:
> >
Brande wrote:
> Search the Cake book for 'Containable' behavior , I think you will find your
> answer there
>
>
>
> On Thu, Sep 24, 2009 at 10:53 AM, lorenx wrote:
>
> > hi all.
>
> > i'm trying to order a deeply related model but the followin
hi all.
i'm trying to order a deeply related model but the following code
gives me an error.
$params = array(
'order' => 'RelatedModel.relatedmodel_field DESC',
'recursive' => 3
);
$models_array = $this->Model->find('all', $params);
i saw that cakephp do several queries to build
array(
'type'=>'datetime',
'label' => 'validity date from',
'selected' => $this->data['Dpage']['validity_date_from'],
'empty' => true
));
well,
that's all.
thanks to
hi all.
i'm dealing with dates.
in my form i would like to edit a DATE database field with the chance
to save a null (or empty) value and, of course, the current option, if
present, selected.
this code does not display a label and i'm not able to pre-select the
current database value:
echo $form
; } else {
> $this->set('model', $this->Model->read(null,
> $id));
> }
> }
> }
>
> It's really just a style of coding that increases clarity (or not, as
> the case may be ;) ).
>
> On S
> 1. Cake's reading the id from the url. You're saying, in the url,
> 'show me the Post controller / the View method / and record number
> #n', and Cake's handling that for you automatically.
sure but... what if i comment out all the $id reference?
this cleaned code:
function view() {
$th
moving from one place to another, so you
> can act on specific fields by calling $this->data['Model']['field'].
>
> Hope this helps!
>
> On Sep 17, 7:05 pm, lorenx wrote:
>
>
>
> > hi all,
> > i'm new to cakephp and, mentioning the bl
a little help please?
On Sep 17, 8:05 pm, lorenx wrote:
> hi all,
> i'm new to cakephp and, mentioning the blog tutorial, i have some
> simple questions.
>
> 1.
> in the sample controller, there is the view action:
>
> function view($id = null) {
&g
->id = $id;
>
> Rick
>
> On Sep 16, 3:45 pm, lorenx wrote:
>
>
>
> > hi all,
> > i'm new to cake so, if you think that a better place exists for my too
> > simple questions... just let me know.
>
> > following the blog tutorial i did some tests
hi all,
i'm new to cakephp and, mentioning the blog tutorial, i have some
simple questions.
1.
in the sample controller, there is the view action:
function view($id = null) {
$this->Post->id = $id;
$this->set('post', $this->Post->read());
}
to better understand, i did some tests
hi all,
i'm new to cake so, if you think that a better place exists for my too
simple questions... just let me know.
following the blog tutorial i did some tests to better understand how
cakephp works;
in the following code:
[code]
function view($id = null) {
$this-MyObj>id = $id;
29 matches
Mail list logo