# |
Dec 19th 2017, 15:56 |
neon1024 |
Yeps, it’s in its own repo as per the path above :slightly_smiling_face: |
# |
Dec 19th 2017, 15:55 |
dereuromark |
Are you developing it inside your app? best to do that standalone, and add classes there with custom autoloader picking them up prbably |
# |
Dec 19th 2017, 15:51 |
hmic |
welcome |
# |
Dec 19th 2017, 15:51 |
hmic |
;-) |
# |
Dec 19th 2017, 15:50 |
neon1024 |
Good job hmic! Thanks dude, spot on as always |
# |
Dec 19th 2017, 15:49 |
neon1024 |
Yes, good point. Let me try that! |
# |
Dec 19th 2017, 15:48 |
hmic |
as it's not a vendor plugin, you need the autolaoder setup in composer.json to recognise it |
# |
Dec 19th 2017, 15:48 |
hmic |
how's that setup in your composer.json |
# |
Dec 19th 2017, 15:48 |
neon1024 |
There is no composer so I’m a bit confused, https://github.com/dereuromark/cakephp-ide-helper/tree/master/tests |
# |
Dec 19th 2017, 15:48 |
hmic |
i'd say so too neon1024 |
# |
Dec 19th 2017, 15:47 |
neon1024 |
Which is why I can only think it’s an autoloader issue, but the test bootstrap loads the plugin okay it seems |
# |
Dec 19th 2017, 15:47 |
neon1024 |
string(72) “/Users/david/Sites/CakePHP-IDEHelper/tests/test_app/plugins/Example/Slug” |
# |
Dec 19th 2017, 15:47 |
hmic |
but you can add whatever you like in there. you could add the whole partner array, if you like to |
# |
Dec 19th 2017, 15:47 |
neon1024 |
@hmic Well the class exists at that namespace, the Plugin class see’s the plugin as loaded, and has the correct path too |
# |
Dec 19th 2017, 15:46 |
hmic |
yes, "partner" is an associated record, there is data in there, just not the neccessary participant_type_id which i add |
# |
Dec 19th 2017, 15:46 |
joop |
but will $data['partner'] will exist before submit?? |
# |
Dec 19th 2017, 15:45 |
obinoob |
neon1024 thanks |
# |
Dec 19th 2017, 15:45 |
hmic |
and this namespace is setup correctly? |
# |
Dec 19th 2017, 15:45 |
joop |
i think you answered my question now |
# |
Dec 19th 2017, 15:45 |
neon1024 |
@hmic string(45) “Example\\Slug\\Model\\Behavior\\SluggableBehavior” |
# |
Dec 19th 2017, 15:44 |
hmic |
neon1024: whats in your classname variable? |
# |
Dec 19th 2017, 15:44 |
joop |
i see now your concept,load the $data[....][....] with calculated data(or wahtever you call now) |
# |
Dec 19th 2017, 15:44 |
neon1024 |
You have to build it yourself if you want the complete url |
# |
Dec 19th 2017, 15:44 |
neon1024 |
Nope |
# |
Dec 19th 2017, 15:44 |
obinoob |
noob question whats the best way to get the Request URL $this->request as getUri() and it is possible to assemble it etc, I also know that Router has static methods etc but any method / property where i can get Request URL? |
# |
Dec 19th 2017, 15:43 |
neon1024 |
Is that an autoloader issue? |
# |
Dec 19th 2017, 15:43 |
neon1024 |
Can anyone tell me why this line fails because `class_exists()` fails, https://github.com/cakephp/cakephp/blob/master/src/Core/ObjectRegistry.php#L92 |
# |
Dec 19th 2017, 15:43 |
hmic |
so if you add the data you need before calling patchEntity - or sneaky like i do in the table - you are good |
# |
Dec 19th 2017, 15:43 |
joop |
you pass a value for it |
# |
Dec 19th 2017, 15:42 |
joop |
ui seee now |
# |
Dec 19th 2017, 15:42 |
hmic |
it is actually just the array you pass to patchEntity |
# |
Dec 19th 2017, 15:42 |
joop |
nooo |
# |
Dec 19th 2017, 15:42 |
joop |
just because i thought $data[''....] is coming from the form |
# |
Dec 19th 2017, 15:41 |
hmic |
if i would add the participant_type_id to the form as a hidden field, i'd not need that at all |
# |
Dec 19th 2017, 15:41 |
hmic |
no. thats the whole idea of adding the type id there |
# |
Dec 19th 2017, 15:40 |
joop |
but do you make it avaliable in the form? |
# |
Dec 19th 2017, 15:39 |
joop |
okey i checking |
# |
Dec 19th 2017, 15:38 |
hmic |
https://gist.github.com/hmic/ea8b558f0733ce3c8b7b75d9513db300 |
# |
Dec 19th 2017, 15:38 |
hmic |
here's an example: |
# |
Dec 19th 2017, 15:38 |
joop |
now i use foreach to iterate on PatcEntities as Entity |
# |
Dec 19th 2017, 15:38 |
hmic |
i do something similar, i think, not in the controller scope, for an associated entity |