Log message #4103604

# At Username Text
# Dec 14th 2017, 15:31 spencdev I took the documentation waaaaay to literal. Thank you, i'll give it a shot
# Dec 14th 2017, 15:31 hmic bootstrap.php is a save place
# Dec 14th 2017, 15:30 hmic yes
# Dec 14th 2017, 15:30 spencdev hmic I think I see my stupidity now. I put it underneath the NotificationsEvent class. I'm guessing that it's actually suppose to go somewhere else
# Dec 14th 2017, 15:28 hmic it's not even listing former events or anything, maybe you open an issue on the website for it to get fixed :D
# Dec 14th 2017, 15:27 mikesmoniker Perhaps off-topic but can anyone tell me what a ticket to CakeFest has been priced at in the past couple of years? The website is just a splash page right now.
# Dec 14th 2017, 15:27 hmic spencdev: where did you attach the NotificationsEvent?
# Dec 14th 2017, 14:51 spencdev I'm not quite sure why this event isn't firing. https://gist.github.com/tspencer9303/eb1ffff786e3c21a2a51dc4587b7a0f8
# Dec 14th 2017, 14:42 eax Ooh, thanks lorenzo!
# Dec 14th 2017, 14:40 lorenzo one with `matching` and another with `notMatching`
# Dec 14th 2017, 14:40 lorenzo eax sounds like the `union()` of 2 queries
# Dec 14th 2017, 14:01 spencdev Okay, that answers my question. Thanks!
# Dec 14th 2017, 14:00 eax Hey folks! Cake3 ORM Question: I have the relation Users hasMany UserTags. I need to run a Query that gets Users who either have a certain UserTag, or no UserTags at all. Can anyone tell me how to do that? Thanks! :)
# Dec 14th 2017, 13:59 hmic spencdev: i'd not want my table to have all the events
# Dec 14th 2017, 13:53 spencdev So I'm a little confused on the event system. So, I have many tables that need to be able to create notifications and I have a notifications table. I believe the best way to do this is through events? If so, do I have the NotificationsTable implement EventListenerInterface and do it that way? Or create a directory called Events and make that implement EventListenerInterface and use the ORM?
# Dec 14th 2017, 12:45 eax You're very welcome :)
# Dec 14th 2017, 12:44 justcharlz oh! okay. thank you very much. Appreciate
# Dec 14th 2017, 12:43 eax )
# Dec 14th 2017, 12:43 eax (Also remember that flash should be with a capital F, if you're in Cake 3
# Dec 14th 2017, 12:43 eax You redirect away from the page, before setting the flash message ;) Switch the order of the lines, so that you return AFTER $errmsg and $this->Flash->error() :)
# Dec 14th 2017, 12:42 justcharlz return $this->redirect(['controller' => 'plans','action' => 'subscribe']); $errmsg = $respdata['message']; $this->flash->error(__('Payment error'.$respdata['message']));
# Dec 14th 2017, 12:42 justcharlz okay. Thanks. I already did this but don't know why it is not working
# Dec 14th 2017, 12:41 eax This requires you to have a warning.ctp element under plugins/PluginName/src/Template/Element/Flash for rendering the flash message. And to run $this->Flash->render(); on the page the user is redirected to
# Dec 14th 2017, 12:41 eax @justchariz: Ahh, then you make a $this->Flash->warning('Your Message'); return $this->redirect(['controller' => 'OtherControllerName', 'action' => 'someAction']);
# Dec 14th 2017, 12:39 justcharlz @eax, Let's say an error occurs in a controller method and you want to redirect the user to another controller with the error message
# Dec 14th 2017, 12:37 eax Do you want to do a flash message, or redirect to another controller? Directly redirecting is pretty easy: return $this->redirect(['controller' => 'OtherControllerName', 'action' => 'someAction']);
# Dec 14th 2017, 12:36 justcharlz like redirect to another controller. say redirect to another method but the method is not in the same controller
# Dec 14th 2017, 12:35 eax *justchariz ^
# Dec 14th 2017, 12:35 eax just_chariz: What do you mean by another controller method?
# Dec 14th 2017, 12:34 justcharlz hello guys. how do I make a flash message appear on anther controller method
# Dec 14th 2017, 12:14 eax list?
# Dec 14th 2017, 12:11 circ-user-5T6dZ list
# Dec 14th 2017, 11:33 eax Hey folks! Cake3 ORM Question: I have the relation Users hasMany UserTags. I need to run a Query that gets Users who either have a certain UserTag, or no UserTags at all. Can anyone tell me how to do that? Thanks! :)
# Dec 14th 2017, 11:07 psantos I know the difference
# Dec 14th 2017, 11:07 psantos I got it. Thanks
# Dec 14th 2017, 11:07 neon1024 It’s worth knowing!
# Dec 14th 2017, 11:07 neon1024 There is a difference between `==` and `===`
# Dec 14th 2017, 11:06 psantos when you say that you is little more strict, what do you mean ? now it looks like this: (add is working) ``` if ($this->request->getParam('prefix') == 'admin') { $this->viewBuilder()->setLayout('admin'); } ```
# Dec 14th 2017, 11:04 psantos thanks.. .I was missing this
# Dec 14th 2017, 11:00 neon1024 If you’re on CakePHP 3.4+ at least
# Dec 14th 2017, 11:00 neon1024 You probably meant `$this->request->getParam('prefix') === 'admin'`