# |
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? |
# |
May 26th 2016, 08:51 |
birdy247 |
but when I check pj($event) after the event is dispatched, nothing comes back |
# |
May 26th 2016, 08:50 |
birdy247 |
I am then doing return $event; from the listener |
# |
May 26th 2016, 08:50 |
birdy247 |
I am trying to return some data from an event using $event->data['name'] = $data; |
# |
May 26th 2016, 08:20 |
unorthodox |
Good to see you everyone! |
# |
May 26th 2016, 07:59 |
megan |
if there is anyone here that wants to join the workshop stream :slightly_smiling_face: https://twitter.com/cakephp/status/735734263060926465 |
# |
May 26th 2016, 07:51 |
marlinc |
Goodluck with the workshops etc |