Log message #3880444

# At Username Text
# May 26th 2016, 09:08 birdy247 return $event;
# May 26th 2016, 09:08 birdy247 $event->data['timetable'] = "123"
# May 26th 2016, 09:08 birdy247 in my listener
# May 26th 2016, 09:06 birdy247 @neon1024: I cant seem to get anything from $event->result
# May 26th 2016, 09:03 neon1024 I don't know / didn't look to see if there was an irc equivalent
# May 26th 2016, 09:03 neon1024 The cool kids here are doing advanced workshops in the #cakefest channel in slack
# May 26th 2016, 09:03 neon1024 Well I have an account through php south coast conference green room from when I was speaking
# May 26th 2016, 09:03 birdy247 what do you think
# May 26th 2016, 09:03 birdy247 @neon1024: why the use of slack :slightly_smiling_face:
# May 26th 2016, 09:00 birdy247 I will try
# May 26th 2016, 09:00 birdy247 or perhaps $result = $event; return $result
# May 26th 2016, 09:00 birdy247 or do I need to return $event
# May 26th 2016, 08:59 birdy247 $event->result['timetable'] = $entities; $event->result['placement'] = $placement; return true;
# May 26th 2016, 08:59 neon1024 For mine in Proffer it can return a whole array of configuration
# May 26th 2016, 08:59 neon1024 If the event is processing a string, you might want to return the modified string
# May 26th 2016, 08:58 neon1024 Well you can return whatever you want from the event
# May 26th 2016, 08:58 neon1024 // Using the event result public function place($order)
# May 26th 2016, 08:58 birdy247 but it doesnt make it clear what you should return
# May 26th 2016, 08:58 birdy247 the 2nd code snippet is the one right?
# May 26th 2016, 08:58 birdy247 I was reading that
# May 26th 2016, 08:57 neon1024 Ahh yes $event->result
# May 26th 2016, 08:57 neon1024 This one, http://book.cakephp.org/3.0/en/core-libraries/events.html#getting-event-results
# May 26th 2016, 08:56 neon1024 Then the event handler needs to return as well obviously
# May 26th 2016, 08:56 neon1024 This is how I've thrown my event, and I would have $result = ..etc ->dispatch()
# May 26th 2016, 08:56 neon1024 https://github.com/davidyell/CakePHP3-Proffer/blob/master/src/Model/Behavior/ProfferBehavior.php#L119-L121
# May 26th 2016, 08:55 neon1024 Let me check I'm sure it was in the book
# May 26th 2016, 08:55 birdy247 and morning back ;)
# May 26th 2016, 08:55 neon1024 Heya ankr
# May 26th 2016, 08:55 birdy247 will try that
# May 26th 2016, 08:55 birdy247 ok, cool
# May 26th 2016, 08:55 ankr and morning
# May 26th 2016, 08:55 ankr y
# May 26th 2016, 08:55 ankr but are you at the part Neon1024x ?
# May 26th 2016, 08:54 Neon1024x I'm over here too!
# May 26th 2016, 08:54 neon1024 Yeah the event return needs to be assigned to a variable when it's dispatched
# May 26th 2016, 08:54 birdy247 or its an imposter ;)
# May 26th 2016, 08:54 birdy247 on slack!?!?!?!?
# May 26th 2016, 08:54 birdy247 who
# May 26th 2016, 08:54 birdy247 hey @neon1024
# May 26th 2016, 08:53 neon1024 Heya birdy247
# May 26th 2016, 08:52 birdy247 am I doing the right thing return $event from the listener?