Log message #4102738

# At Username Text
# Dec 12th 2017, 12:19 dereuromark most likely just writing to headers method of response as always.
# Dec 12th 2017, 12:19 dereuromark well, in the end you can at least get your answers from the code there, how it is done then using the framework.
# Dec 12th 2017, 12:12 jamesjayson I was trying to do this with just cake but thank you :)
# Dec 12th 2017, 12:10 dereuromark see for example https://github.com/scherersoftware/cake-cktools#securitycomponent (4th link on "cakephp hsts" etc)
# Dec 12th 2017, 12:10 dereuromark did you try google? if I do that I immediataly find results here
# Dec 12th 2017, 12:09 jamesjayson Hello everybody, is there a cake method to set the hsts header? I can set it using php but id rather make use of the framework if possible
# Dec 12th 2017, 11:57 ksandeep_ Thanks Hmic
# Dec 12th 2017, 11:53 hmic and you want to change the passed arrayobject
# Dec 12th 2017, 11:53 hmic or is the question originating from the fact that objects are passed by reference, arrays are not...
# Dec 12th 2017, 11:52 hmic birdy247: so you convert to array when passing
# Dec 12th 2017, 11:52 hmic regarding the things you are talking about later, you can easily provide data to be used in different controllers form a common place, be it a table class from the model scope, or any other custom lib, or even a component to be attached to multiple controllers easily, which is meant to solve this problem specifically
# Dec 12th 2017, 11:52 birdy247 hmic answer is no
# Dec 12th 2017, 11:51 hmic ksandeep_, your initial question is about accessing the request form the model scope, the answer neon1024 gave is just it: nope!
# Dec 12th 2017, 11:50 hmic :P
# Dec 12th 2017, 11:50 hmic !tell birdy247 about TIAS
# Dec 12th 2017, 11:47 birdy247 I I have an ArrayObject, can this be passed to the ->save() function as a 2nd param?
# Dec 12th 2017, 11:43 ksandeep_ Hope question is now more clear and sorry for the english
# Dec 12th 2017, 11:42 ksandeep_ neon1024: like many form using city, state country drop-down, but i do not want to repeat same code again and again so just get data list from model and pass any request variable if itpresent there
# Dec 12th 2017, 11:40 ksandeep_ i have list with different drop-down on different forms and do not want to repeat same code many time but the value depends on other parent values selections
# Dec 12th 2017, 11:38 ksandeep_ Ok, You mean from controller. I can do it vary well from there but now i want to move all conman logic to model so can be access from any controller
# Dec 12th 2017, 11:38 ksandeep_ Ok, how i You mean from controller. I can do it vary well from there but now i want to move all conman logic to model so can be access from any controller
# Dec 12th 2017, 11:37 neon1024 You would call a model method and pass it any dependencies from the request from somewhere which did have access to the request
# Dec 12th 2017, 11:36 neon1024 You can’t. The model layer doesn’t have access to the request
# Dec 12th 2017, 11:36 ksandeep_ Hello, How we can use $this->request->getData() in model or it is not valid
# Dec 12th 2017, 10:57 hmic well done
# Dec 12th 2017, 10:52 GuillaumeP ok it's working
# Dec 12th 2017, 10:49 GuillaumeP thanks hmic :)
# Dec 12th 2017, 10:49 GuillaumeP alright will do
# Dec 12th 2017, 10:48 hmic change the template you want to render to be inside the plugin
# Dec 12th 2017, 10:48 GuillaumeP plugin of course
# Dec 12th 2017, 10:48 hmic do you want to render the template in your plugin or main app
# Dec 12th 2017, 10:48 GuillaumeP in the plugin not the main app
# Dec 12th 2017, 10:48 hmic does that template exist in the plugin or main app?
# Dec 12th 2017, 10:48 GuillaumeP I thought it would look for the required template in the template folder of the plugin
# Dec 12th 2017, 10:47 GuillaumeP Even if the correct path is proposed by CakePHP ?
# Dec 12th 2017, 10:46 hmic so you need to change the template path to your plugin path now of course
# Dec 12th 2017, 10:46 hmic aha
# Dec 12th 2017, 10:46 GuillaumeP it worked when my code wasn't wrapped inside a plugin
# Dec 12th 2017, 10:45 hmic what did you change?
# Dec 12th 2017, 10:45 hmic GuillaumeP, did it work before?
# Dec 12th 2017, 10:43 GuillaumeP Hi guys. I'm getting this "Error: The template Email/html/verification.ctp was not found." Then CakePHP v3.5 suggests a few file location. But one of those suggested path exists and is readable. Has anyone a clue what's going on?