# |
Oct 22nd 2009, 12:48 |
dogmatic69 |
TehTreag: is that not the name? |
# |
Oct 22nd 2009, 12:48 |
TehTreag |
that's the name, the id is like dogmatic69 says |
# |
Oct 22nd 2009, 12:48 |
TehTreag |
jszwedko: data[model][field] |
# |
Oct 22nd 2009, 12:46 |
dogmatic69 |
jszwedko: ModelField i think |
# |
Oct 22nd 2009, 12:45 |
jszwedko |
's source, but can't find exactly where that happens |
# |
Oct 22nd 2009, 12:45 |
jszwedko |
does anyone know exactly in what manner the form helper autogenerates the id's for the input elements? I'm trying to trace through helper |
# |
Oct 22nd 2009, 12:45 |
zyro |
/Post/Comment[author_name=john]/../name Selects the name of all Posts that have at least one Comment written by john |
# |
Oct 22nd 2009, 12:45 |
zyro |
well i was getting curious because manual and/or api/tests got that table which xpath statements work, which included: |
# |
Oct 22nd 2009, 12:44 |
dogmatic69 |
sno thats not it |
# |
Oct 22nd 2009, 12:43 |
dogmatic69 |
$test['Parent'][key( Set::extract('/Parent/Child[child_name=child2]', $test) )]; try something like that |
# |
Oct 22nd 2009, 12:43 |
dogmatic69 |
dont know if you can do that one shot. |
# |
Oct 22nd 2009, 12:42 |
zyro |
nope i want the name of the parent whose child is the child with child_name "child2" |
# |
Oct 22nd 2009, 12:41 |
dogmatic69 |
zyro: you want the child name? |
# |
Oct 22nd 2009, 12:40 |
zyro |
this time binned if it helps: http://bin.cakephp.org/view/665069352 ... |
# |
Oct 22nd 2009, 12:39 |
dogmatic69 |
sup alan|macbook |
# |
Oct 22nd 2009, 12:37 |
alan|macbook |
yop dogmatic69 |
# |
Oct 22nd 2009, 12:36 |
dogmatic69 |
hey chan, hows every one :) |
# |
Oct 22nd 2009, 12:34 |
zyro |
sry for that one |
# |
Oct 22nd 2009, 12:34 |
alkemann |
missing a paste bin for one |
# |
Oct 22nd 2009, 12:33 |
zyro |
--> whats wrong here? am i missing sth? result should be parent2 imho... |
# |
Oct 22nd 2009, 12:33 |
zyro |
the result: Array([0] => parent1) |
# |
Oct 22nd 2009, 12:33 |
zyro |
Set::extract('/Parent/Child[child_name=child2]/../parent_name', $test) |
# |
Oct 22nd 2009, 12:33 |
zyro |
); |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:33 |
zyro |
'child_name' => 'child2' |
# |
Oct 22nd 2009, 12:33 |
zyro |
'Child' => array( |
# |
Oct 22nd 2009, 12:33 |
zyro |
'parent_name' => 'parent2', |
# |
Oct 22nd 2009, 12:33 |
zyro |
array( |
# |
Oct 22nd 2009, 12:33 |
zyro |
), |
# |
Oct 22nd 2009, 12:33 |
zyro |
) |
# |
Oct 22nd 2009, 12:32 |
zyro |
'child_name' => 'child1' |
# |
Oct 22nd 2009, 12:32 |
zyro |
'Child' => array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
'parent_name' => 'parent1', |
# |
Oct 22nd 2009, 12:32 |
zyro |
array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
'Parent' => array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
$test = array( |
# |
Oct 22nd 2009, 12:32 |
zyro |
lo people.. just hit a problem with Set::extract ... maybe someone can provide help: |
# |
Oct 22nd 2009, 12:31 |
alan|macbook |
$programmes = $this->Programme->find('list'); gives a list of checkboxes |
# |
Oct 22nd 2009, 12:31 |
alan|macbook |
ok. You are right about flat data arrays |