# |
Apr 18th 2019, 16:14 |
ricksaccous |
the second is never used |
# |
Apr 18th 2019, 16:13 |
ricksaccous |
@mrfeedback <?= is very distinct from <? ?> |
# |
Apr 18th 2019, 16:13 |
waspinator |
never heard of it being a problem before |
# |
Apr 18th 2019, 16:13 |
waspinator |
you mean this `<?=` |
# |
Apr 18th 2019, 16:11 |
waspinator |
https://github.com/cakephp/cakephp.org/blob/master/src/Template/Element/Layout/default/footer/social_links.ctp |
# |
Apr 18th 2019, 16:09 |
mrfeedback |
i mean its used everywhere as it seems :slightly_smiling_face: |
# |
Apr 18th 2019, 16:09 |
mrfeedback |
cakephp.org\src\Template\Element\Layout\default\footer\social_links.ctp e.g. |
# |
Apr 18th 2019, 16:08 |
admad |
where? |
# |
Apr 18th 2019, 16:08 |
mrfeedback |
hmm browsing through templates of cakephp.org i realize that you use shorttags for opening and echoing in php. i was told that this feature is often disabled on hosts due to security concerns. or is this not an actual problem anymore? |
# |
Apr 18th 2019, 16:07 |
admad |
then make a PR for the docs :slightly_smiling_face: |
# |
Apr 18th 2019, 16:02 |
mrfeedback |
ah funny. on the website itself it is removed. but not in the book |
# |
Apr 18th 2019, 15:56 |
mrfeedback |
thx |
# |
Apr 18th 2019, 15:50 |
admad |
https://github.com/cakephp/cakephp.org |
# |
Apr 18th 2019, 15:49 |
mrfeedback |
hmm i have no idea where to put the PR for the website? :slightly_smiling_face: |
# |
Apr 18th 2019, 15:45 |
admad |
@mrfeedback make a PR :slightly_smiling_face: |
# |
Apr 18th 2019, 15:42 |
mrfeedback |
i think you can remove the Google+ Button on the website :) |
# |
Apr 18th 2019, 15:38 |
this.impetus |
@admad check, will do, ty |
# |
Apr 18th 2019, 15:37 |
admad |
@this.impetus you might also want to consider https://github.com/admad/cakephp-glide |
# |
Apr 18th 2019, 14:49 |
ricksaccous |
lol |
# |
Apr 18th 2019, 14:49 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Core/ObjectRegistry.php#L97 |
# |
Apr 18th 2019, 14:49 |
ricksaccous |
well actually that makes sense |
# |
Apr 18th 2019, 14:49 |
ricksaccous |
or it didn't instantiate it |
# |
Apr 18th 2019, 14:49 |
this.impetus |
It alarms me terribly that I understand none of that :P |
# |
Apr 18th 2019, 14:49 |
ricksaccous |
i had no idea that it didn't load it until you used it |
# |
Apr 18th 2019, 14:48 |
ricksaccous |
interesting |
# |
Apr 18th 2019, 14:48 |
neon1024 |
.. a bit like a DI container |
# |
Apr 18th 2019, 14:48 |
neon1024 |
As if it can’t find the key, it’ll instantiate the object and set the instance to the key |
# |
Apr 18th 2019, 14:48 |
neon1024 |
At least that’s my understanding of how the object registry works |
# |
Apr 18th 2019, 14:48 |
neon1024 |
They don’t get instantiated in the registry until you use them anyway |
# |
Apr 18th 2019, 14:47 |
neon1024 |
I think it’s such a microscopic enhancement to selectivly load helpers in the controller method |
# |
Apr 18th 2019, 14:47 |
neon1024 |
Loading helpers in the AppView I guess |
# |
Apr 18th 2019, 14:47 |
neon1024 |
You shouldn’t be loading helpers in a template file |
# |
Apr 18th 2019, 14:46 |
ricksaccous |
but i don't think it makes a huge difference |
# |
Apr 18th 2019, 14:46 |
ricksaccous |
@neon1024 it probably makes more sense to manipulate that in the view class especially because the response is available to you there |
# |
Apr 18th 2019, 14:45 |
this.impetus |
got it. tyvm guys |
# |
Apr 18th 2019, 14:45 |
ricksaccous |
yeah that would be loadHelper |
# |
Apr 18th 2019, 14:44 |
ricksaccous |
which woul dbe |
# |
Apr 18th 2019, 14:44 |
ricksaccous |
yeah i'm saying in controller you would do $this->viewBuilder->setHelpers() and in the view you would use the other method i think |
# |
Apr 18th 2019, 14:43 |
this.impetus |
Sigh, I don't really even understand helpers, sorry. I mean conceptually I do, but I don't havea great concept of cake's architecture. What I *want* to achieve is a means of generating mouse-over thumbnails. The front-end JS stuff is where I am actually qualified. if only one class is going to be using this helper, is it not better to load it in the controller? |
# |
Apr 18th 2019, 14:42 |
neon1024 |
`$this->_viewBuilder->setHelpers();` ? |
# |
Apr 18th 2019, 14:41 |
ricksaccous |
and you would use a different method to do that |