# |
May 26th 2017, 10:07 |
Neon1024 |
My form has both parent and association |
# |
May 26th 2017, 10:07 |
hmic |
steinkel: the idea comes from the possibility to add data to the request as per psr-7, but not beeing able to remove... |
# |
May 26th 2017, 10:06 |
steinkel |
it's not part of http://www.php-fig.org/psr/psr-7/ why would you need to remove it? |
# |
May 26th 2017, 10:05 |
hmic |
i'd go straight to lastest 2.9. so you only need to check for breakage once |
# |
May 26th 2017, 10:04 |
NeoTherm1c|Work |
(I ponder more because 2.7.11's fix was also in 2.8.2, so... should I just go to 2.8.0 from 2.7.10?) |
# |
May 26th 2017, 10:03 |
NeoTherm1c|Work |
somewhat simple update question, if I'm on 2.7.10, do I go 2.7.11, 2.8.0 -> 2.8.9 and then 2.9.x? (Assuming that I make each version jump manually to make sure there's no problems with our usage) |
# |
May 26th 2017, 10:00 |
Neon1024 |
Guess i’ll just use the deprecated methods |
# |
May 26th 2017, 09:58 |
Neon1024 |
So it’s not possible to remove a request data key and value? |
# |
May 26th 2017, 09:57 |
Neon1024 |
Speaking of which I can’t find a method for removing request data, other than $this->request = $this->request->withData(), which still sets a value |
# |
May 26th 2017, 09:53 |
Neon1024 |
Unless I’m missing it, it’s a pretty big var_dump() |
# |
May 26th 2017, 09:53 |
Neon1024 |
I would think context would know how the validation had been called, either directly or as an association |
# |
May 26th 2017, 09:52 |
Neon1024 |
Can I make validation conditional on associations based on the parent? Using a closure for the ‘when’ the $context doesn’t have any data from the parent, as the association is validated and merged separatly. So I’ll have to check and adjust the data in the controller before calling patchEntity right? Isn’t there a more elegant way to do this? How can I pass parent context to the associations validation? |
# |
May 26th 2017, 09:35 |
Neon1024 |
This seems a conflict to me |
# |
May 26th 2017, 09:35 |
Neon1024 |
Why is notEmpty($field, $message, $mode), but requirePresence($field, $mode, $message) |
# |
May 26th 2017, 09:33 |
Neon1024 |
steinkel, I’ve actually never used the template extensions, should probably try that out at some point |
# |
May 26th 2017, 09:32 |
Neon1024 |
More deps for rendering, but makes the code neater imo |
# |
May 26th 2017, 09:32 |
Neon1024 |
https://github.com/davidyell/Cricketeer/blob/develop/webroot/mustache/batting.mustache |
# |
May 26th 2017, 09:31 |
Neon1024 |
Exactly as I did in this project, https://github.com/davidyell/Cricketeer |
# |
May 26th 2017, 09:31 |
Neon1024 |
So when I add a new hasMany association, I can render the template with JS to rename the fields correctly without having to put markup into my JS |
# |
May 26th 2017, 09:30 |
Neon1024 |
So that I can render the template with both PHP and Javascript |
# |
May 26th 2017, 09:30 |
Neon1024 |
I might refactor into something like Mustache templates |
# |
May 26th 2017, 09:30 |
Neon1024 |
As on my edit for hasMany, I need to be able to render the same form multiple times |
# |
May 26th 2017, 09:30 |
Neon1024 |
I’ve gone with elements |
# |
May 26th 2017, 09:24 |
steinkel |
@neon1024 Can I render another template inside a template? > Yes you can use template extension |
# |
May 26th 2017, 09:08 |
kareylo |
Element is for part of static html |
# |
May 26th 2017, 09:06 |
kareylo |
@neon1024 @birdy247 You can use Element or Cell |
# |
May 26th 2017, 08:43 |
Neon1024 |
Guess I’ll smash it out and see how I feel about it later |
# |
May 26th 2017, 08:43 |
Neon1024 |
Ah well, I can’t refactor what I haven’t written |
# |
May 26th 2017, 08:40 |
Neon1024 |
I don’t want to duplicate the code either |
# |
May 26th 2017, 08:40 |
Neon1024 |
Just feels a bit messy and inelegant |
# |
May 26th 2017, 08:40 |
Neon1024 |
So I can wrap the whole thing in a form |
# |
May 26th 2017, 08:40 |
Neon1024 |
So I might need to make elements for just the form fields |
# |
May 26th 2017, 08:40 |
Neon1024 |
But I don’t need a whole form |
# |
May 26th 2017, 08:40 |
Neon1024 |
As I need to be able to add associations on the same form |
# |
May 26th 2017, 08:40 |
birdy247 |
Yes |
# |
May 26th 2017, 08:40 |
Neon1024 |
Elements are the way to go |
# |
May 26th 2017, 08:39 |
birdy247 |
was no 1 answered lol |
# |
May 26th 2017, 08:39 |
birdy247 |
The general answer that came back |
# |
May 26th 2017, 08:39 |
Neon1024 |
Not in the mood for work :( |
# |
May 26th 2017, 08:39 |
Neon1024 |
I could do with a day off today |
# |
May 26th 2017, 08:39 |
Neon1024 |
NOWAIRLY |