# |
May 25th 2017, 20:19 |
inoas |
and I could reuse all the nice extensions you build :) |
# |
May 25th 2017, 20:18 |
jeremyharris |
meder_ can you please gist $attachments at that point, as well as $patchedEntity |
# |
May 25th 2017, 20:18 |
inoas |
so all that's nice... |
# |
May 25th 2017, 20:18 |
inoas |
and the twig templates that reside in my database are already written as twig files, then again cached by twig loader |
# |
May 25th 2017, 20:18 |
meder_ |
eg $entity['attachments'] = array_merge ( $entity['attachments'], $attachments ); |
# |
May 25th 2017, 20:18 |
meder_ |
do I just need to "patch" $entity['attachments'] with line 25? |
# |
May 25th 2017, 20:18 |
inoas |
WyriHaximus: I can already use helpers, and extensions that you supply |
# |
May 25th 2017, 20:18 |
jeremyharris |
so that’s why using ‘associated’ showed no difference |
# |
May 25th 2017, 20:18 |
meder_ |
ok |
# |
May 25th 2017, 20:17 |
jeremyharris |
first level associations are patched by default |
# |
May 25th 2017, 20:17 |
meder_ |
i actually just found it's not using the associated table in the 'associated' call, weird |
# |
May 25th 2017, 20:17 |
meder_ |
jeremyharris: it has a ton of internal stuff, i pretty much replicated it there |
# |
May 25th 2017, 20:17 |
inoas |
and every element can have its own twig template |
# |
May 25th 2017, 20:16 |
meder_ |
https://gist.github.com/anonymous/36f6b41353aceaacbb7b01a653418ab0 |
# |
May 25th 2017, 20:16 |
inoas |
basically m document consist of multiple (translatable) elements, and each can be a module => small xml snipplet... which then fires a cakephp cell in the background |
# |
May 25th 2017, 20:15 |
inoas |
I will have something that maps to cells... |
# |
May 25th 2017, 20:15 |
inoas |
this is how I proceed now |
# |
May 25th 2017, 20:15 |
inoas |
https://gist.github.com/inoas/649a921179fbd160d80c4fc2bfd70876#gistcomment-2106583 |
# |
May 25th 2017, 20:13 |
inoas |
aka I leave elements, cells, layout as it is cause I am replacing the whole layout with whatever comes from the database (cached as files) |
# |
May 25th 2017, 20:13 |
WyriHaximus |
inoas: seen your previous message but you where online when I wanted to reply |
# |
May 25th 2017, 20:13 |
inoas |
WyriHaximus: if you are reading this: I made my own SimpleTwigView which overwrides render instead of _render and has a renderTwigTemplate() which does the loadTemplate()->render() call |
# |
May 25th 2017, 19:58 |
jeremyharris |
and the entity you pass to save() — the result of patchEntity |
# |
May 25th 2017, 19:58 |
jeremyharris |
can you gist the actual newEntity / patching process |
# |
May 25th 2017, 19:58 |
meder_ |
this is before |
# |
May 25th 2017, 19:58 |
jeremyharris |
ok, is this the entity before or after it is patched? |
# |
May 25th 2017, 19:58 |
meder_ |
array merge perhaps |
# |
May 25th 2017, 19:57 |
meder_ |
jeremyharris: yeah i wasn't setting it in the entity itself, attachments field. just manually override it? what about appending incase it exists? |
# |
May 25th 2017, 19:57 |
jeremyharris |
and then your change wouldn’t have to go into trying a full path, since it’s what would be suggested :slightly_smiling_face: |
# |
May 25th 2017, 19:57 |
meder_ |
https://gist.github.com/anonymous/0f5a0c3467764f4bd14fb84ea30fe149 |
# |
May 25th 2017, 19:57 |
jeremyharris |
yes, that’s what I was thinking |
# |
May 25th 2017, 19:57 |
chris-andre |
Right, in the original docs. You want `/full/path/to/root/bin/cake myshell myparam` |
# |
May 25th 2017, 19:56 |
jeremyharris |
and then just use the full path in the example, and your change can omit the bit about it since it will be the example |
# |
May 25th 2017, 19:56 |
jeremyharris |
right, what I’m saying is we should drop even suggesting cd /path/to andand bin/cake myShell |
# |
May 25th 2017, 19:55 |
chris-andre |
In my example, I have the full path as example. |
# |
May 25th 2017, 19:55 |
jeremyharris |
nm I’m being lazy, yes it does :slightly_smiling_face: so yeah I would still suggest always using a full path |
# |
May 25th 2017, 19:54 |
jeremyharris |
does `php /full/path/to/bin/cake` show the proper paths to your app and cake core? |
# |
May 25th 2017, 19:53 |
chris-andre |
Ill comment on GH |
# |
May 25th 2017, 19:53 |
jeremyharris |
although nm, that probably won’t work |
# |
May 25th 2017, 19:52 |
jeremyharris |
e.g., change the example to the /full/path/to/bin/cake and remove the bit you added about trying the full path |
# |
May 25th 2017, 19:51 |
jeremyharris |
@chris-andre probably should be discussed on GH; my point was I don’t think we should even concern ourselves with the bit about CDing into the dir and running the shell like that, and use fully qualified paths instead (even in the existing example) |
# |
May 25th 2017, 19:51 |
jeremyharris |
gist your code and I’ll explain |