# |
Jan 22nd 2019, 08:23 |
marwan.salim |
Hi. I'm doing extended bake. How to add new method in existing bake controller ? In my case, I want to create a `history` method. I already added following file src/Template/Bake/Element/Controller/history.twig //below is the code inside history.twig {% set compact = ["'#{singularName}'"] %} /** * Change History method * * @param int|null $id User id. * @return void */ public function history($id = |
# |
Jan 22nd 2019, 05:33 |
admad |
@akkaweb session exists only when using a webserver, not CLI |
# |
Jan 22nd 2019, 03:09 |
challgren |
https://book.cakephp.org/3.0/en/development/sessions.html#accessing-the-session-object |
# |
Jan 22nd 2019, 03:08 |
challgren |
No and if you are doing so your business logic is in the wrong places |
# |
Jan 22nd 2019, 03:07 |
akkaweb |
Is it possible to use Session in a CakePHP Shell? |
# |
Jan 22nd 2019, 02:53 |
marwan.salim |
@ricksaccous welcome friend |
# |
Jan 22nd 2019, 02:52 |
ricksaccous |
@marwan.salim thanks, you too |
# |
Jan 22nd 2019, 02:51 |
marwan.salim |
Hi Everyone, I'm Marwan from Malaysia . Have a great day ahead, everyone!:) |
# |
Jan 22nd 2019, 02:05 |
waspinator |
right now I have ```$time = Time::parseDateTime($time_string, 'YYYY-MM-DD-H-mm-ss'); $time->subHours(5); $time->setTimezone('America/New_York') ``` |
# |
Jan 22nd 2019, 02:00 |
waspinator |
how would you specify the timezone of a string when using `Time::parseDateTime` |
# |
Jan 21st 2019, 22:12 |
challgren |
Thanks @dereuromark |
# |
Jan 21st 2019, 21:54 |
challgren |
@neon1024 check out https://github.com/bcrowe/cakephp-encrypted-type |
# |
Jan 21st 2019, 19:01 |
ricksaccous |
@graziel looks pretty nice |
# |
Jan 21st 2019, 19:00 |
graziel |
i like these kind of errors in steppers, clear where they are https://vuetifyjs.com/en/components/steppers#multi-line-error-state |
# |
Jan 21st 2019, 18:55 |
jhall |
yep its going pretty good thanks |
# |
Jan 21st 2019, 18:52 |
ricksaccous |
I'm sure you're doing alright :slightly_smiling_face: |
# |
Jan 21st 2019, 18:52 |
ricksaccous |
lolll |
# |
Jan 21st 2019, 18:52 |
jhall |
haha |
# |
Jan 21st 2019, 18:52 |
jhall |
and I suck at it |
# |
Jan 21st 2019, 18:52 |
ricksaccous |
lol oh |
# |
Jan 21st 2019, 18:52 |
jhall |
I am the UX person haha |
# |
Jan 21st 2019, 18:47 |
ricksaccous |
tabbed/stepped forms are a pain |
# |
Jan 21st 2019, 18:47 |
ricksaccous |
or just ask the client what they want, giving them different options |
# |
Jan 21st 2019, 18:46 |
ricksaccous |
prob you can bug the UX person (if you have one) on how they want it done |
# |
Jan 21st 2019, 18:46 |
ricksaccous |
up to you |
# |
Jan 21st 2019, 18:46 |
ricksaccous |
so meh |
# |
Jan 21st 2019, 18:46 |
ricksaccous |
but then they might get frustrated if there are erros in other tabs |
# |
Jan 21st 2019, 18:46 |
ricksaccous |
lol |
# |
Jan 21st 2019, 18:45 |
ricksaccous |
or you could prob write in jquery a script that on page load, go to first tab with errors in it |
# |
Jan 21st 2019, 18:44 |
jhall |
right |
# |
Jan 21st 2019, 18:44 |
ricksaccous |
because it could get messy if there are errors across tabs |
# |
Jan 21st 2019, 18:44 |
ricksaccous |
you could just resort to displaying errors as flash messages |
# |
Jan 21st 2019, 18:44 |
jhall |
ah ok |
# |
Jan 21st 2019, 18:44 |
ricksaccous |
but if you wanted |
# |
Jan 21st 2019, 18:44 |
ricksaccous |
no i was saying based on if it has x error make x tab active |
# |
Jan 21st 2019, 18:44 |
ricksaccous |
however it would be weird if they made errors in two different tabs |
# |
Jan 21st 2019, 18:44 |
jhall |
like a flash message? |
# |
Jan 21st 2019, 18:43 |
jhall |
oh and display them at the top? |
# |
Jan 21st 2019, 18:43 |
ricksaccous |
and based on that show active tab |
# |
Jan 21st 2019, 18:43 |
ricksaccous |
in that case you can probably just do getErrors() or something |
# |
Jan 21st 2019, 18:43 |
ricksaccous |
oh |