# |
May 30th 2017, 01:34 |
Leonardo_0112 |
but seems like it is not working |
# |
May 30th 2017, 01:34 |
Leonardo_0112 |
I'd like to do is: $this->Banner->query('TRUNCATE TABLE banners;'); new CakeEvent('Model.afterDelete', $this); |
# |
May 30th 2017, 01:33 |
Leonardo_0112 |
In Cake 2 can I fire model afterDelete manually? |
# |
May 30th 2017, 01:25 |
royalty |
got it working but that was messy :( |
# |
May 30th 2017, 01:10 |
royalty |
I'll have to edit the widget |
# |
May 30th 2017, 01:10 |
royalty |
I think I know why, I'm simply spitting out the model message for the error instead of calling upon the custom error message I set |
# |
May 30th 2017, 01:09 |
royalty |
hmmmmm |
# |
May 30th 2017, 01:09 |
royalty |
I think what's happening is the options I have given are not being respected |
# |
May 30th 2017, 01:08 |
royalty |
however, the translated version is not showing |
# |
May 30th 2017, 01:07 |
royalty |
and I have errors set up in the field options like: https://gist.github.com/Modicrumb/a86f0efb53d5e03b1a648ea4c424fe0a |
# |
May 30th 2017, 01:02 |
royalty |
I am messing around with displaying errors for the field |
# |
May 30th 2017, 01:02 |
royalty |
so I am trying to build a form widget |
# |
May 30th 2017, 00:25 |
lpj145 |
somebody try use Crud with Cake 3.4 ? |
# |
May 30th 2017, 00:08 |
hiromi2424 |
My understand: set data to entity without patchEntity/newEntity will make entity have inconsistent data. validation and marshal is for set consistent data. |
# |
May 30th 2017, 00:06 |
hiromi2424 |
I don’t think not only for query formatting. It is for set correct data to entity. |
# |
May 30th 2017, 00:02 |
meder_ |
as opposed to more manual? |
# |
May 30th 2017, 00:01 |
meder_ |
like for related tables bound? so it's just an easy way to basically form a query to do an update? |
# |
May 29th 2017, 23:59 |
hiromi2424 |
meder_ not only validation. association objects are initialized e.g. when _ids given |
# |
May 29th 2017, 23:59 |
meder_ |
is patchEntity primarily just used for validation? if so, what's the point of sending validate: false (or equivalent) ? |
# |
May 29th 2017, 23:54 |
hiromi2424 |
*date/datetime |
# |
May 29th 2017, 23:54 |
hiromi2424 |
`setJsonEncodeFormat()` is part of DateFormatTrait |
# |
May 29th 2017, 23:53 |
hiromi2424 |
By default JsonView automatically render data as json such convert data/datetime object to formatted string with cake Cake\I18n\DateFormatTrait |
# |
May 29th 2017, 23:51 |
royalty |
if you are using js to display it you can either just modify it with php beforehand or try using moment.js or something |
# |
May 29th 2017, 23:50 |
royalty |
so you aren't using php to display data? |
# |
May 29th 2017, 23:50 |
hiromi2424 |
@keremcankaya I have experience with changing json date/datetime format: ``` \Cake\I18n\Date::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssZZZ"); \Cake\I18n\FrozenDate::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssZZZ"); \Cake\I18n\Time::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssZZZ"); \Cake\I18n\FrozenTime::setJsonEncodeFormat("yyyy-MM-dd'T'HH:mm:ssZZZ"); ``` in `config/bootstrap.php` |
# |
May 29th 2017, 23:43 |
keremcankaya |
Should i create a view and use the helper or just modify the result set? |
# |
May 29th 2017, 23:43 |
keremcankaya |
I’m actually returning a json response from controller |
# |
May 29th 2017, 23:39 |
dereuromark |
Use the TimeHelper |
# |
May 29th 2017, 23:35 |
keremcankaya |
Is mapping the best way? Feels like there should be an option or an nicer way to format created |
# |
May 29th 2017, 23:35 |
keremcankaya |
Finally I’ve started cake3 however I’m having hard time with returning created in a formatted way |
# |
May 29th 2017, 23:04 |
royalty |
nevermind i got it |
# |
May 29th 2017, 22:48 |
royalty |
how do i pass a value to a validation rule? |
# |
May 29th 2017, 22:48 |
royalty |
hello |
# |
May 29th 2017, 21:26 |
savant |
what action is failing when you redirect? |
# |
May 29th 2017, 21:25 |
lucaskpo123 |
I did not do this login |
# |
May 29th 2017, 21:25 |
lucaskpo123 |
I clarify that it is an old code |
# |
May 29th 2017, 21:20 |
savant |
can you gist your controller? |
# |
May 29th 2017, 21:20 |
lucaskpo123 |
yes,Did not work |
# |
May 29th 2017, 21:19 |
savant |
lucaskpo123 did you try what lorenzo said to try? |
# |
May 29th 2017, 21:18 |
lucaskpo123 |
can anybody help me |
# |
May 29th 2017, 21:17 |
lucaskpo123 |
Hellw |