# |
Jul 5th 2017, 13:58 |
cleptric |
Just pass `$this->request->getData()` to `patchEntity()` |
# |
Jul 5th 2017, 13:57 |
cleptric |
Would also be better to avoid strange side effects. |
# |
Jul 5th 2017, 13:57 |
gutts |
cleptric: do you know how to access all of the request data or all the data in a validation rule? |
# |
Jul 5th 2017, 13:57 |
gutts |
ah, ok |
# |
Jul 5th 2017, 13:56 |
cleptric |
If you’re using `$this->request->data` you can modifiy it. If you use the new `$this->request->getData()` and `$this->request->withData()` no, as the request is immutable then. Just save it to a new variable and change that. |
# |
Jul 5th 2017, 13:56 |
jarard01 |
fields have been whitelsited |
# |
Jul 5th 2017, 13:56 |
gutts |
but i'd also like to know the other way just for my own information.. i still can't access all the request params in my validation rule, on 'when' or 'notEmpty' 3rd param |
# |
Jul 5th 2017, 13:56 |
jarard01 |
paginator sort is not working, my url: properties/index/3?sort=idanddirection=asc |
# |
Jul 5th 2017, 13:55 |
gutts |
and use 'child_count' as my rule |
# |
Jul 5th 2017, 13:55 |
gutts |
so i figured i could loop it over and just throw a 'child_count' field instead of constantly loop over inside of the validation |
# |
Jul 5th 2017, 13:54 |
gutts |
the validation condition i have.. i'll need to loop over all the other fields to see if the 'parent' field has any 'children' |
# |
Jul 5th 2017, 13:54 |
popperz0r |
nop |
# |
Jul 5th 2017, 13:53 |
gutts |
on a related note, is it considered bad practice to manipulate the request data before you pass it into newEntities? |
# |
Jul 5th 2017, 13:53 |
popperz0r |
Hello, i need help with epilog() anyone used it before? |
# |
Jul 5th 2017, 13:48 |
adriencs |
someone know why doing `->distinct()` in `->contain()` make the contain return nothing ? |
# |
Jul 5th 2017, 13:47 |
jarard01 |
even so I tried adding them but the sort does not work |
# |
Jul 5th 2017, 13:47 |
gutts |
casmo: to validationDefault? ( tried to look for the 2nd param in the docs ) |
# |
Jul 5th 2017, 13:46 |
jarard01 |
so I shouldn't have to whitelist my id, title and active fields for pagination |
# |
Jul 5th 2017, 13:46 |
jarard01 |
the books says: "By default sorting can be done on any non-virtual column a table has" |
# |
Jul 5th 2017, 13:43 |
phpubar |
@devito This is the full lifecycle of a request-response in Cake: https://book.cakephp.org/3.0/en/intro.html#cakephp-request-cycle |
# |
Jul 5th 2017, 13:42 |
inoas |
Sebollson I had the same problem - in my dispair what I did was concatting in an anonymous function and sorting by STRING or NATURAL |
# |
Jul 5th 2017, 13:42 |
casmo |
function myValidationCheck($a, $b) { debug($b); } |
# |
Jul 5th 2017, 13:42 |
casmo |
The seconds parameter in your validation function has all the data, hasn't it? |
# |
Jul 5th 2017, 13:40 |
gutts |
i need to iterate through the other fields to create my condition. that or should i manipulate the request data manually? |
# |
Jul 5th 2017, 13:40 |
gutts |
is there a way to access "other" fields in request data within a validation rule? $context for 'on' in ->add or the 3rd param in notEmpty provide just data for a given field |
# |
Jul 5th 2017, 13:38 |
devito |
v -> middleware? -> c -> model -> c -> -> middleware ? ->v that right? |
# |
Jul 5th 2017, 13:37 |
casmo |
https://book.cakephp.org/3.0/en/controllers/components/pagination.html#control-which-fields-used-for-ordering |
# |
Jul 5th 2017, 13:37 |
devito |
what part of the request life cycle does a middleware get triggered? |
# |
Jul 5th 2017, 13:37 |
casmo |
You might need to whitelist them |
# |
Jul 5th 2017, 13:35 |
jarard01 |
anyone have any idea why my pagination sort links would'nt be working, the numbered pagination links work, but when I clikc the columns the page re-loads but ordering remains as before |
# |
Jul 5th 2017, 13:32 |
Sebollson |
I mean the equivalent of SQL order by col1 DESC ,col2 DESC |
# |
Jul 5th 2017, 13:31 |
Sebollson |
is there a way to ues collections to sort array by 2 values insteed of 1? |
# |
Jul 5th 2017, 13:31 |
Sebollson |
Hey there |
# |
Jul 5th 2017, 13:29 |
inoas |
nutch (+ hbase) + solr seem to do ... however I am not sure about relevance/page rank and I am just looking for experiences :) |
# |
Jul 5th 2017, 13:29 |
admad |
https://azure.microsoft.com/en-us/pricing/details/cognitive-services/search-api/web/ |
# |
Jul 5th 2017, 13:28 |
inoas |
there is also some smaller denmark startup billing you like 400 bucks / month / platform for site search |
# |
Jul 5th 2017, 13:28 |
inoas |
now migration has to happen because of "cloud dependency" |
# |
Jul 5th 2017, 13:28 |
inoas |
yes it does but why repeat the same mistake again |
# |
Jul 5th 2017, 13:27 |
admad |
i think bing has a similar service |
# |
Jul 5th 2017, 13:27 |
inoas |
the clients I have have been paying good USD to google to use their on page site search |
# |
Jul 5th 2017, 13:27 |
inoas |
however it is clearly the intention of google to shut those operations down |