# |
Dec 13th 2017, 03:08 |
joopm |
i have some issue becasue i have there hasmany association |
# |
Dec 13th 2017, 03:07 |
joopm |
is there a way to return a single element insted of the array[0] in a query function? |
# |
Dec 13th 2017, 03:05 |
joopm |
good morning too you |
# |
Dec 13th 2017, 00:08 |
rafael.junqueira.sant |
instead of giving me what I expected, it gives me an input text with type='certainFunction' and name='certainFunction' |
# |
Dec 13th 2017, 00:06 |
rafael.junqueira.sant |
this is in the form templates: 'certainFunction' => '<button{{attrs}} class="btn btn-default"><i class="fa fa-certain-function"></i> '.__('Certain Function - btw, can I do this?').'</button>' |
# |
Dec 13th 2017, 00:05 |
rafael.junqueira.sant |
Hello, is there a way to register a new predefined input template for the Form helper? For example, instead of customizing every button for a certain function, I want to echo $this->Form->certainFunction(). I tried adding certainFunction to the form template list, but it didn't work. |
# |
Dec 12th 2017, 23:13 |
braeden |
Goooooooodmorning vietnam |
# |
Dec 12th 2017, 19:40 |
hughbertd |
Cool, will do |
# |
Dec 12th 2017, 19:39 |
admad |
check vfsStream |
# |
Dec 12th 2017, 19:39 |
hughbertd |
:) thanks, I get it tho ;) |
# |
Dec 12th 2017, 19:39 |
admad |
stupid bot |
# |
Dec 12th 2017, 19:38 |
slackebot |
~tell @hughbertd about google php mock filesystem |
# |
Dec 12th 2017, 19:38 |
slackebot |
Command sent from Slack by admad: |
# |
Dec 12th 2017, 19:36 |
hughbertd |
Hi all, Is there an easy way to mock the filesystem for testing? i.e. like Time::setTestNow |
# |
Dec 12th 2017, 17:30 |
flavius |
it all makes sense now :) |
# |
Dec 12th 2017, 17:29 |
flavius |
found a better explanation for my issue here -> https://stackoverflow.com/questions/34691716/why-does-formatting-a-date-return-the-wrong-year |
# |
Dec 12th 2017, 16:54 |
hughbertd |
OK cool, thank you all |
# |
Dec 12th 2017, 16:54 |
hmic |
so yes. if you remove them from webroot and put them in another dir |
# |
Dec 12th 2017, 16:53 |
neon1024 |
Images would usually be server by the webserver and not by php |
# |
Dec 12th 2017, 16:53 |
dereuromark |
no, only if not found. |
# |
Dec 12th 2017, 16:52 |
hughbertd |
Hi All, possibly a silly question, but would requests for things like images (when their path is rendered on the page) go through the Middleware layers in Cake3? |
# |
Dec 12th 2017, 16:49 |
flavius |
well at least i can overwrite the timezone and locale through the 2nd and 3rd parameter in i18nFormat |
# |
Dec 12th 2017, 16:43 |
hmic |
not cake |
# |
Dec 12th 2017, 16:43 |
hmic |
it's php that is "broken" with that respect |
# |
Dec 12th 2017, 16:42 |
flavius |
i would have understood this for some random time string, but not for the Time object that contains the timezone inside, i think i18nFormat is broken |
# |
Dec 12th 2017, 16:38 |
hmic |
if your country has no english locale |
# |
Dec 12th 2017, 16:38 |
flavius |
i can see that :slightly_smiling_face: |
# |
Dec 12th 2017, 16:38 |
hmic |
difficult to accomplish :O |
# |
Dec 12th 2017, 16:38 |
hmic |
(or gmt+1 respectively) |
# |
Dec 12th 2017, 16:38 |
flavius |
thing is my application should be in english, but the server is located in my timezone |
# |
Dec 12th 2017, 16:38 |
hmic |
uk is gmt timezone |
# |
Dec 12th 2017, 16:37 |
V99 |
hmic: slackebot i will start learning cakephp and i take notes of yours recomendations |
# |
Dec 12th 2017, 16:37 |
flavius |
haha, switching from en_US to en_UK outputs correctly |
# |
Dec 12th 2017, 16:36 |
hmic |
utilize the locale |
# |
Dec 12th 2017, 16:36 |
hmic |
thats the idea of the i18n in the name! |
# |
Dec 12th 2017, 16:36 |
hmic |
like i said in the very beginning |
# |
Dec 12th 2017, 16:35 |
flavius |
so the timezone in my Time object isn't used, instead what's used for i18nFormat is what locale i have setup in my config? |
# |
Dec 12th 2017, 16:35 |
hmic |
V99, time to get started! |
# |
Dec 12th 2017, 16:35 |
V99 |
and i havent idea of how cakephp works |
# |
Dec 12th 2017, 16:34 |
hmic |
flavius: makes sense, as this is what gets set to intl.default_locale, which php internally uses to determine the timezone to use on outputting date/time related data |
# |
Dec 12th 2017, 16:34 |
dereuromark |
but if you are a beginner maybe stick to easier things here |