# |
Jul 12th 2018, 13:00 |
josbeir |
:) |
# |
Jul 12th 2018, 13:00 |
josbeir |
@admad knows abour cricket, definatly india now |
# |
Jul 12th 2018, 12:54 |
neon1024 |
Shambolic. |
# |
Jul 12th 2018, 12:54 |
neon1024 |
https://www.bbc.co.uk/sport/cricket/scorecard/ECKO42913 |
# |
Jul 12th 2018, 12:53 |
ricksaccous |
yeah bro i could have made you a burrito right here with guac, beans, and sour cream |
# |
Jul 12th 2018, 12:52 |
neon1024 |
It was a mistake to queue for burritos |
# |
Jul 12th 2018, 12:52 |
neon1024 |
Still, they batted better than Hampshire v Glamorgan last week, by the time I’d got food in the mid innings interval we were 4 down |
# |
Jul 12th 2018, 12:51 |
neon1024 |
It’s the stupidity of the dismissals which gall me |
# |
Jul 12th 2018, 12:32 |
admad |
see, 3 gone as soon as spinners came on :) |
# |
Jul 12th 2018, 12:28 |
admad |
@neon1024 it would have been a decent contest if your batsmen knew how to play spin :P |
# |
Jul 12th 2018, 10:58 |
dereuromark |
plus covering some extra cases. |
# |
Jul 12th 2018, 10:58 |
neon1024 |
Ah yeah, you did the same |
# |
Jul 12th 2018, 10:57 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/FBNQ2928H/conditional_ordering_with_beforefind.php / https://slack-files.com/T053DPNCM-FBNQ2928H-0c0ef167d1 |
# |
Jul 12th 2018, 10:56 |
dereuromark |
yeah, this is way more elegant: https://github.com/dereuromark/cakephp-shim/blob/master/src/Model/Table/Table.php#L369 |
# |
Jul 12th 2018, 10:55 |
neon1024 |
Yeah I might need to go in that direction, as a beforeFind would overwrite any PaginatorHelper query strings |
# |
Jul 12th 2018, 10:55 |
dereuromark |
I just like to use the simple `public $order = ['created' => 'DESC'];` here still :slightly_smiling_face: |
# |
Jul 12th 2018, 10:54 |
hmic |
which makes it possible to get overwritten easily too, whiche beforeFind makes more difficult |
# |
Jul 12th 2018, 10:53 |
neon1024 |
Slick hmic! |
# |
Jul 12th 2018, 10:53 |
neon1024 |
Suppose a beforeFind |
# |
Jul 12th 2018, 10:53 |
hmic |
you can just overwrite the find() method in the table to add to the query object |
# |
Jul 12th 2018, 10:53 |
neon1024 |
A plugin feels a bit overkill |
# |
Jul 12th 2018, 10:53 |
dereuromark |
or steal the idea |
# |
Jul 12th 2018, 10:53 |
dereuromark |
Using shim plugin you can. |
# |
Jul 12th 2018, 10:53 |
neon1024 |
That’s a controller property though right? I’d have to read the Table class property from the controller I guess |
# |
Jul 12th 2018, 10:53 |
dereuromark |
ah, you mean for tables? |
# |
Jul 12th 2018, 10:52 |
dereuromark |
$paginate property can do that |
# |
Jul 12th 2018, 10:52 |
neon1024 |
I know you can set an order on an association |
# |
Jul 12th 2018, 10:52 |
neon1024 |
Can we set default table class ordering? Used to be able to in cake 2 I recall |
# |
Jul 12th 2018, 10:51 |
neon1024 |
Hehe |
# |
Jul 12th 2018, 10:46 |
hmic |
i might step into admads footsteps in the future... my timezone is already obsfucated |
# |
Jul 12th 2018, 10:45 |
neon1024 |
#rubberduck |
# |
Jul 12th 2018, 10:45 |
neon1024 |
Of course, it’s an entity, it’s got the `has()` method |
# |
Jul 12th 2018, 10:45 |
neon1024 |
Is there a neater way to check for associations in an entity mutator method? Other than just checking `$this->_properties[$associatedPropertyName]` ? |
# |
Jul 12th 2018, 10:35 |
neon1024 |
They might be! |
# |
Jul 12th 2018, 10:32 |
josbeir |
you make it sound like @admad is the stig |
# |
Jul 12th 2018, 10:32 |
josbeir |
:) |
# |
Jul 12th 2018, 10:31 |
neon1024 |
All I know is that @admad is hard to sneak a cheeky pull request past! :,) |
# |
Jul 12th 2018, 10:28 |
josbeir |
yes his slack timezone gives us that info:D |
# |
Jul 12th 2018, 10:28 |
neon1024 |
@josbeir Well @admad identity is a closely guarded secret, but they have alluded to being in India previously ;) |
# |
Jul 12th 2018, 10:17 |
jojomartius |
@saeideng no because the theme must be loaded activly while the plugin's view is overwriting the default view just because its loaded or am i wrong? |
# |
Jul 12th 2018, 10:11 |
neon1024 |
Yes, it needs to have no namespace it would seem |