Log message #4150436

# At Username Text
# Jun 12th 2018, 10:07 neon1024 This is what I’d look at first
# Jun 12th 2018, 10:07 neon1024 https://book.cakephp.org/3.0/en/core-libraries/collections.html#Cake\Collection\Collection::indexBy
# Jun 12th 2018, 10:06 Martin` I've converted that helper from our cakephp 1.3 project, I really like to change some things, but better to just format it the way it likes :P
# Jun 12th 2018, 10:06 neon1024 I agree with arnis then, I’d use a Collection method
# Jun 12th 2018, 10:06 Martin` Well I'm using a view helper to select multiple users. but that helper needs the data as an array: [users_231 => ['id' => 231, 'name' => 'Pieter']] etc
# Jun 12th 2018, 10:05 slackebot !xy
# Jun 12th 2018, 10:05 slackebot Command sent from Slack by neon1024:
# Jun 12th 2018, 10:05 neon1024 But do tell use your use-case, as it sounds like
# Jun 12th 2018, 10:05 neon1024 The third is to use an Entity mutator method
# Jun 12th 2018, 10:05 neon1024 As arnis said, the first one is Collections, as you said, the second is formatResults, which actually uses the Collections
# Jun 12th 2018, 10:04 neon1024 There are three approaches, depending on what you need to do
# Jun 12th 2018, 10:04 arnis what do you mean by "format the data the way I need" ?
# Jun 12th 2018, 10:04 Martin` only I cant' change the key in array I think
# Jun 12th 2018, 10:03 Martin` yes list is not what I need but add 'formatResults' to query I think I can format the data the way I need?
# Jun 12th 2018, 10:02 arnis find('list') maybe works for you. With custom finder you will adjust your querie to suit your needs.
# Jun 12th 2018, 10:00 arnis use collections for that
# Jun 12th 2018, 09:58 Martin` inder=finder
# Jun 12th 2018, 09:58 Martin` Don't know what the best way is to do that, or is it the best to just create a custom inder and call formatResults?
# Jun 12th 2018, 09:57 Martin` Can I also make a custom function in table for toArray() ? of something like that, I need the data in some other format than default :)
# Jun 12th 2018, 09:42 lorenzo @neon1024 but the amount of cake in seatgeek is steadily growing :)
# Jun 12th 2018, 09:42 lorenzo @neon1024 mostly operations for me, actaully
# Jun 12th 2018, 09:37 josbeir i personally am not a big fan of BS but i'm seeing the producivity benefit ofcourse :slightly_smiling_face:
# Jun 12th 2018, 09:36 slackebot Action: josbeir hides
# Jun 12th 2018, 09:36 josbeir was facing the same issue for a new cake project recently and decided that the extra work effort i would have put to make bs4 working correctly was best spent elsewhere... i needed it for a backend, so i just created something from scratch ...
# Jun 12th 2018, 09:34 josbeir right..
# Jun 12th 2018, 09:31 arnis already tried lilhermit plugin, also working partialy. Looks like it for BS 4.0 or some kind a beta 4.x.
# Jun 12th 2018, 09:28 josbeir but it seemed to work ok
# Jun 12th 2018, 09:28 josbeir its less featured tho
# Jun 12th 2018, 09:27 josbeir (there was an alternative bs4 plugin too => https://packagist.org/packages/lilhermit/cakephp-plugin-bootstrap4
# Jun 12th 2018, 09:26 neon1024 My work I mean
# Jun 12th 2018, 09:26 neon1024 We haven’t moved over to Bootstrap 4 just yet, so I haven’t tried it
# Jun 12th 2018, 09:25 neon1024 So any code you could help with would be super
# Jun 12th 2018, 09:25 neon1024 Unfortunately jadb has kind of vanished, and left @admad with the project really
# Jun 12th 2018, 09:24 neon1024 Then we can work on getting those updated :slightly_smiling_face:
# Jun 12th 2018, 09:24 neon1024 arnis, Would you mind opening issues for them? Or proposing some code fixes with a pull request?
# Jun 12th 2018, 09:24 arnis :/
# Jun 12th 2018, 09:24 arnis there are few things that are not working (like form control append, error messages are being rendered as help-block but should be rendered differently etc) with that BS4 plugin and latest BS 4.1.x
# Jun 12th 2018, 09:20 neon1024 Although probably not much PHP though? Mostly Go or Python?
# Jun 12th 2018, 09:20 neon1024 Work must be good for you, as it seems quite a few of the Cake team are at Seatgeek now
# Jun 12th 2018, 09:18 lorenzo yay!
# Jun 12th 2018, 09:18 neon1024 Good thanks. Finally upgrading our main projects to Cake 3