Log message #4152823

# At Username Text
# Jun 21st 2018, 09:08 neothermic @neon1024 Mrrrrr
# Jun 21st 2018, 08:50 birdy247 model->model2...
# Jun 21st 2018, 08:50 birdy247 so I should do as above?
# Jun 21st 2018, 08:50 lorenzo in a table is not terrible, just weird, since it already has the notion of associations
# Jun 21st 2018, 08:49 lorenzo in a behavior it is o to use `loadModel()`
# Jun 21st 2018, 08:49 birdy247 I use TableRegistry
# Jun 21st 2018, 08:49 birdy247 but if I am using a behaviour for example
# Jun 21st 2018, 08:49 birdy247 thats how I currently do it
# Jun 21st 2018, 08:48 birdy247 like $this->model->model2->model3
# Jun 21st 2018, 08:48 lorenzo are you loading thing that are not associations?
# Jun 21st 2018, 08:48 lorenzo inside a table you should probably use associations
# Jun 21st 2018, 08:48 birdy247 @lorenzo and this is ok to d inside another Table?
# Jun 21st 2018, 08:47 lorenzo @birdy247 @steinkel the way to replace it is by adding the `ModelAwareTrait` to the class and then using `$this->loadModel()` instead
# Jun 21st 2018, 08:27 ra7bi for that but i was wondering if that plugin support that by default
# Jun 21st 2018, 08:27 ra7bi i can create config file
# Jun 21st 2018, 08:27 neon1024 https://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses
# Jun 21st 2018, 08:26 neon1024 If you want to change the class globally, perhaps you just need a new form template
# Jun 21st 2018, 08:26 ra7bi thanks in advanced .
# Jun 21st 2018, 08:26 ra7bi okay let me check that plugin
# Jun 21st 2018, 08:26 neon1024 You sort that out :see_no_evil:
# Jun 21st 2018, 08:25 neon1024 Yeah @neothermic
# Jun 21st 2018, 08:25 ra7bi @neothermic i want to set the class for all inputs in my project
# Jun 21st 2018, 08:25 neon1024 I would recommend using this, https://github.com/friendsofcake/bootstrap-ui
# Jun 21st 2018, 08:25 ra7bi my configuration is ``` public $helpers = [ 'Form' => [ 'className' => 'Bootstrap.Form', 'buttons' => [ 'type' => 'primary' ] ] ```
# Jun 21st 2018, 08:25 neon1024 `$this->Form->control('Example', ['type' => 'text', 'class' => 'example input']);`
# Jun 21st 2018, 08:24 ra7bi hello all , anyone knows how to set custom css class for input type text in https://github.com/Holt59/cakephp3-bootstrap-helpers
# Jun 21st 2018, 08:24 neon1024 The TableLocator class is about 90% the same as TableRegistry
# Jun 21st 2018, 08:23 neon1024 The class isn’t actually deprecated, but part of the API is, and the naming is changing
# Jun 21st 2018, 08:23 neon1024 @birdy247 It’s a bit of a misnomer really
# Jun 21st 2018, 08:23 neon1024 Which just wraps the code that Jorge mentioned
# Jun 21st 2018, 08:23 neon1024 I use this trait
# Jun 21st 2018, 08:23 neon1024 https://github.com/cakephp/cakephp/blob/de7ebdb88e11c4283185ba33c827151f02352b4b/src/ORM/Locator/LocatorAwareTrait.php
# Jun 21st 2018, 08:21 birdy247 I thought TableRegistry was being depricated
# Jun 21st 2018, 08:19 steinkel @birdy247 TableRegistry::getTableLocator()->get('X');
# Jun 21st 2018, 08:17 hmic magiq_, have you checked the locale validator instead?
# Jun 21st 2018, 08:16 birdy247 (new TableLocator())->get('MembershipExtras')
# Jun 21st 2018, 08:16 birdy247 I have been writing like this
# Jun 21st 2018, 08:16 birdy247 How are people replacing TableRegistery::get ?
# Jun 21st 2018, 08:16 madbbb @steinkel thank you:+1:
# Jun 21st 2018, 08:14 steinkel @madbbb not out of the box, it's an all or nothing configuration now, but you could add a flag to users table and check it to enable 2fa per user
# Jun 21st 2018, 08:13 madbbb morning. Is it possible to use cakedc/users 2fa per user? when I added Configure::write('Users.GoogleAuthenticator.login', true) it started to authenticate every user. Should I use some prelogin event which will turn Users.GoogleAuthenticator.login based on user settings or is there a better way?