# |
Nov 23rd 2017, 12:12 |
birdy247 |
I am using the JsonApi for crud |
# |
Nov 23rd 2017, 12:10 |
birdy247 |
@neon1024 I am struggling to take the date and timezone from my api request and manipulate it into my request data so the marshaler picks it up |
# |
Nov 23rd 2017, 12:04 |
neon1024 |
Plus we can recruit Ionas as well! |
# |
Nov 23rd 2017, 12:04 |
neon1024 |
Yeah, if a few of us can get it up to spec perhaps we can add it to Friends of Cake :) |
# |
Nov 23rd 2017, 11:57 |
birdy247 |
I will get it on github |
# |
Nov 23rd 2017, 11:57 |
birdy247 |
I have the plugin |
# |
Nov 23rd 2017, 11:57 |
birdy247 |
@dereuromark ok will do |
# |
Nov 23rd 2017, 11:57 |
dereuromark |
@birdy247 let me know what you need to get things rollin' |
# |
Nov 23rd 2017, 11:56 |
dereuromark |
jep, thats the one |
# |
Nov 23rd 2017, 11:55 |
lorenzo |
that is the solution birdy has |
# |
Nov 23rd 2017, 11:55 |
lorenzo |
there are other cases where you already know the users’ timezone, so you do not need to change the form |
# |
Nov 23rd 2017, 11:55 |
lorenzo |
as selecting the timezone is important |
# |
Nov 23rd 2017, 11:55 |
lorenzo |
there are some cases where you do want to change the forms |
# |
Nov 23rd 2017, 11:55 |
lorenzo |
it depends on the type of solution you ened |
# |
Nov 23rd 2017, 11:54 |
dereuromark |
And without having to rewrite all forms if possible. |
# |
Nov 23rd 2017, 11:54 |
dereuromark |
I am eager to help as long as we get sth that works. |
# |
Nov 23rd 2017, 11:54 |
dereuromark |
:slightly_smiling_face: |
# |
Nov 23rd 2017, 11:54 |
lorenzo |
he volunteered to make a plugin after I explained how to get it done :) |
# |
Nov 23rd 2017, 11:53 |
lorenzo |
my solution is the one birdy is using |
# |
Nov 23rd 2017, 11:53 |
dereuromark |
Maybe we should persist it in docs or sth for timezoned setup |
# |
Nov 23rd 2017, 11:53 |
lorenzo |
but as I have demonstrated to many already, there is no one solution to fix all possible scenarios |
# |
Nov 23rd 2017, 11:53 |
lorenzo |
@dereuromark I have a solution I’ve been sharing around |
# |
Nov 23rd 2017, 11:51 |
admad |
@birdy247 guess i was wrong about the event. Never needed it since i can just setup required config before calling execute() |
# |
Nov 23rd 2017, 11:49 |
birdy247 |
I am assuming this is wildy wrong |
# |
Nov 23rd 2017, 11:47 |
birdy247 |
File uploaded https://cakesf.slack.com/files/U0T295QA3/F85HTA43Y/-.php / https://slack-files.com/T053DPNCM-F85HTA43Y-d63ce4dd65 |
# |
Nov 23rd 2017, 11:47 |
birdy247 |
I had this |
# |
Nov 23rd 2017, 11:47 |
birdy247 |
and set the to what my custom datatype exepctes |
# |
Nov 23rd 2017, 11:47 |
birdy247 |
but lets say I wanted to take the date and timezone attributes from my api POST request |
# |
Nov 23rd 2017, 11:46 |
birdy247 |
@neon1024 I am maybe oversimplfying things |
# |
Nov 23rd 2017, 11:39 |
acosonic |
So, anyone, webmail client written in cakephp ? some github |
# |
Nov 23rd 2017, 11:35 |
neon1024 |
I fell into that hole yesterday and it’s not a nice hole :P |
# |
Nov 23rd 2017, 11:35 |
neon1024 |
Just make sure you use the authorization header for your api and not a custom header |
# |
Nov 23rd 2017, 11:35 |
neon1024 |
Crud is super flexible like that <3 |
# |
Nov 23rd 2017, 11:35 |
neon1024 |
I mean you don’t even need to do that if you don’t want to |
# |
Nov 23rd 2017, 11:35 |
neon1024 |
As long as you return `$this->Crud->execute()` you can do whatever you want in the controller method |
# |
Nov 23rd 2017, 11:34 |
neon1024 |
Just do some stuff, then pass off to Crud |
# |
Nov 23rd 2017, 11:33 |
neon1024 |
Me? No, I’d just change the data array in the controller most likely |
# |
Nov 23rd 2017, 11:33 |
birdy247 |
in beforeMarsahal? |
# |
Nov 23rd 2017, 11:33 |
birdy247 |
:+1: |
# |
Nov 23rd 2017, 11:33 |
neon1024 |
But that would be my approach anyway, I’d make the ajax nice and simple and obvious, then I’d do a spot of data manipulation in PHP :slightly_smiling_face: |
# |
Nov 23rd 2017, 11:32 |
neon1024 |
Crud adds events, it doesn’t replace the core ones :slightly_smiling_face: |