# |
Jul 7th 2017, 18:31 |
glanceded |
It seems it is called by cakephp when trying to change datatype, but I have included the file, the namespaces are ok... |
# |
Jul 7th 2017, 18:28 |
glanceded |
should I try ::build? |
# |
Jul 7th 2017, 18:28 |
glanceded |
I'm trying to create a type and i'm getting this error Unknown type "App\Database\Types\IpType" InvalidArgumentException |
# |
Jul 7th 2017, 18:06 |
inoas |
null or false probably not but did '' (empty string) not work? |
# |
Jul 7th 2017, 17:52 |
josh_rodarte |
Thanks. I dove into the helper's code and empty attributes don't appear to be supported. |
# |
Jul 7th 2017, 17:51 |
inoas |
like 'data-my-html-5-data-attrib' => '' |
# |
Jul 7th 2017, 17:51 |
inoas |
josh_rodarte without knowing I would try 'yourAttrib' => '' |
# |
Jul 7th 2017, 16:28 |
phpubar |
Thanks, @hmic. My boss was trying to blame excessive session updates on a particular status check route, but I double-checked and no session is created, so false alarm :slightly_smiling_face: |
# |
Jul 7th 2017, 16:22 |
josh_rodarte |
Is it possible to add empty attributes with HTMLHelper? |
# |
Jul 7th 2017, 16:19 |
origamiwork |
hmic: Yes, lol. So I assume you're talking about parsing the file names in src/Controller using straight php to get the controller names? I'm considering that, but if there's a built in way to get the controller names in cakephp 3 I would prefer to use that. Sorry if i'm not understanding correctly. |
# |
Jul 7th 2017, 16:18 |
hmic |
phpubar: don't add the sessioncomponent (or auth or the like) to the controller in question? |
# |
Jul 7th 2017, 16:17 |
phpubar |
Is there a way to bypass generating a session for a particular route? |
# |
Jul 7th 2017, 16:09 |
hmic |
why do you think it's so important to have the filename <-> classname mapping correct (and the dir <-> namespace mapping)? |
# |
Jul 7th 2017, 16:08 |
hmic |
is there a way in php? |
# |
Jul 7th 2017, 16:07 |
origamiwork |
hmic: I think I know what you're saying. I could list the files using php and get the names that way, right? I'm wondering if there's a built in way in cakephp though? |
# |
Jul 7th 2017, 16:04 |
hmic |
if you answer my second question, you will know |
# |
Jul 7th 2017, 16:04 |
origamiwork |
so whenever I add another controller, I can automatically get an updated list. |
# |
Jul 7th 2017, 16:03 |
origamiwork |
hmic: haha, yes I could just look at the files, but I want to be able to get a list to use in the code itself. |
# |
Jul 7th 2017, 16:02 |
hmic |
is there a way in php to do so? :O |
# |
Jul 7th 2017, 16:02 |
hmic |
origamiwork, like `ls src/Controller`? :P |
# |
Jul 7th 2017, 15:58 |
origamiwork |
Konnichiwa everyone, does anyone know if there's a built in way to get a list of all the controllers in cake 3? |
# |
Jul 7th 2017, 15:43 |
adriencs |
:awesome: |
# |
Jul 7th 2017, 15:43 |
hmic |
the ProgressHelper does that, you could check the source too |
# |
Jul 7th 2017, 15:42 |
hmic |
adriencs, have a look here: https://book.cakephp.org/3.0/en/console-and-shells/helpers.html |
# |
Jul 7th 2017, 15:41 |
adriencs |
hey o/, how can I do a $this->out() that rewrite the same line in a Shell ? |
# |
Jul 7th 2017, 15:31 |
gutts |
hah, 'controller' => 'all' the => was a =. nm. TGIF |
# |
Jul 7th 2017, 15:28 |
gutts |
and I'm for sure not passing another parameter besides that |
# |
Jul 7th 2017, 15:28 |
dereuromark |
Yeah. Once I hack this line in, it is 5:03 here as expected.. |
# |
Jul 7th 2017, 15:26 |
dereuromark |
someone I feel there is the same output formatting missing as in the helper: $value = $value->timezone('Europe/Berlin'); etc |
# |
Jul 7th 2017, 15:26 |
gutts |
why does $this->redirect(['action' => 'edit', 'controller' => 'all', 'prefix' => 'admin', 'plugin' => 'pages'], 4, 5); redirect me to /admin/pages/all/edit/1/4/5 ? where does the 1 come from? |
# |
Jul 7th 2017, 15:24 |
dereuromark |
to be 05:03 then for output? |
# |
Jul 7th 2017, 15:24 |
dereuromark |
the value coming from the DB is already 'time' => '2017-02-02T03:03:00+00:00', 'timezone' => 'UTC', shouldnt this have the local timezone set? |
# |
Jul 7th 2017, 15:19 |
dereuromark |
sure |
# |
Jul 7th 2017, 15:19 |
hmic |
Type::build('time/date*')->useLocaleParser()->useImmutable()->setLocaleFormat() basically. 4 times: time, date, datetime, timestamp |
# |
Jul 7th 2017, 15:18 |
dereuromark |
and ini_set('intl.default_locale', 'de_DE'); |
# |
Jul 7th 2017, 15:17 |
dereuromark |
so whats your bootstrap setup besides date_default_timezone_set('UTC'); ? |
# |
Jul 7th 2017, 15:17 |
hmic |
dereuromark: yes. server is UTC, app is another timezone... for me, when $entity->dateTimeField showed correct local time, formhelper did too. |
# |
Jul 7th 2017, 15:15 |
dereuromark |
i am talking about the use case of having utc as server setup (recommended) |
# |
Jul 7th 2017, 15:15 |
glanceded |
@hmic thank you, with that page opened I was working on |
# |
Jul 7th 2017, 15:15 |
dereuromark |
@hmic not really, for the time helper you got a outputTimezone to format properly, but that is missing onthe widget level :S |
# |
Jul 7th 2017, 15:15 |
hmic |
you need to, basically. |